1$( function() { 2 var $grid = $('.grid').isotope({ 3 itemSelector: 'article' 4 }); 5 6 // filter buttons 7 $('.filters-button-group').on( 'click', 'button', function() { 8 var filterValue = $( this ).attr('data-filter'); 9 $grid.isotope({ filter: filterValue }); 10 }); 11 $('.button-group').each( function( i, buttonGroup ) { 12 var $buttonGroup = $( buttonGroup ); 13 $buttonGroup.on( 'click', 'button', function() { 14 $buttonGroup.find('.is-checked').removeClass('is-checked'); 15 $( this ).addClass('is-checked'); 16 }); 17 }); 18}); 19 20// debounce so filtering doesn't happen every millisecond 21function debounce( fn, threshold ) { 22 var timeout; 23 return function debounced() { 24 if ( timeout ) { 25 clearTimeout( timeout ); 26 } 27 function delayed() { 28 fn(); 29 timeout = null; 30 } 31 timeout = setTimeout( delayed, threshold || 100 ); 32 } 33} 34 35$(window).bind("load", function() { 36 $('.filters-button-group .is-checked').click(); 37});
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.