1// Masonry 2// function addSizeClasses() { 3// 4// var classes = ["masonry-brick--small", "masonry-brick--medium", "masonry-brick--large"]; 5// 6// $(".masonry-brick").each(function(){ 7// $(this).addClass(classes[~~(Math.random()*classes.length)]); 8// }); 9// } 10// 11// addSizeClasses(); 12 13// MASONRY INFINITE SCROLL 14// 15// var $grid = $('.grid').masonry({ 16// itemSelector: 'none', // select none at first 17// columnWidth: '.grid-sizer', 18// gutter: '.gutter-sizer', 19// percentPosition: true, 20// stagger: 30, 21// scrollThreshold: 100, 22// // nicer reveal transition 23// visibleStyle: { transform: 'translateY(0)', opacity: 1 }, 24// hiddenStyle: { transform: 'translateY(25px)', opacity: 0 }, 25// }); 26// 27// // get Masonry instance 28// var msnry = $grid.data('masonry'); 29// 30// // initial items reveal 31// $grid.imagesLoaded( function() { 32// //$grid.removeClass('are-images-unloaded'); 33// $grid.masonry( 'option', { itemSelector: '.masonry-brick' }); 34// var $items = $grid.find('.masonry-brick'); 35// $grid.masonry( 'appended', $items ); 36// }); 37// 38// 39// $grid.infiniteScroll({ 40// path: '.next', 41// append: '.masonry-brick', 42// 43// //history: true, 44// // outlayer: msnry, 45// status: '.page-load-status', 46// hideNav: '.pagination', 47// 48// // load pages on button click 49// button: '.view-more-button', 50// scrollThreshold: false, 51// 52// 53// 54// 55// 56// }); 57 58var $container = $(".post-loader").infiniteScroll({ 59 path: ".next", 60 append: ".post-list__item", 61 status: ".page-load-status", 62 hideNav: ".pagination", 63 64 // load pages on button click - commented this out to get the click / view more scroll option working 65 // button: ".view-more-button", 66 // scrollThreshold: false, 67 68 // disable loading on scroll 69 loadOnScroll: false 70}); 71 72var $viewMoreButton = $(".view-more-button"); 73$viewMoreButton.on("click", function() { 74 // load next page 75 $container.infiniteScroll("loadNextPage"); 76 // enable loading on scroll 77 $container.infiniteScroll("option", { 78 loadOnScroll: true 79 }); 80 // hide button
81 $viewMoreButton.hide(); 82}); 83 84// Working scroller 85// $(".big-grid--loader").infiniteScroll({ 86// path: ".next", 87// append: ".big-grid__item", 88// status: ".page-load-status", 89// hideNav: ".pagination", 90// 91// // load pages on button click 92// button: ".view-more-button", 93// scrollThreshold: false 94// });
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.