The future belongs to those, who believe of their dreams.
$(window).load(function () { $('div.box').live('mouseenter',function(){ $(this).find('.boxhover').fadeIn(); }); $('div.box').live('mouseleave',function(){ $(this).find('.boxhover').fadeOut(); }); $('.toggleicon').click(function(){ if($('div.header').hasClass("toggleActive")) $('div.header').removeClass("toggleActive"); else $('div.header').addClass("toggleActive"); }); // endless scrolling var $container = $('#allposts'); $container.imagesLoaded(function(){ $container.masonry({ itemSelector: '.box' }); }); $container.infinitescroll({ navSelector : 'div.navigation', // selector for the paged navigation nextSelector : 'div.navigation a#nextPage', // selector for the NEXT link (to page 2) itemSelector : '.box', // selector for all items you'll retrieve bufferPx: 0, debug : true, loading: { finishedMsg: 'No more posts to load.', img: '', msgText: 'Loading More Posts' } }, // trigger Masonry as a callback function( newElements ) { // hide new items while they are loading var $newElems = $( newElements ).css({ opacity: 0 }); // ensure that images load before adding to masonry layout $newElems.imagesLoaded(function(){ // show elems now they're ready $newElems.animate({ opacity: 1 }); $container.masonry( 'appended', $newElems, true ); }); } ); // End of endless scrolling });
TotallyLayouts has Tumblr Themes, Twitter Backgrounds, Facebook Covers, Tumblr Music Player and Tumblr Follower Counter