1$(document).ready(function(){ 2 3 $( function() { 4 // init Isotope 5 var $grid = $('.news_list').isotope({ 6 itemSelector: '.news_item', 7 masonry: { 8 // use outer width of grid-sizer for columnWidth 9 //columnWidth: 50 10 }, 11 layoutMode: 'fitRows' 12 13 }); 14 // filter functions 15 var filterFns = { 16 17 }; 18 // bind filter button click 19 $('.filters-button-group').on( 'click', 'button', function() { 20 var filterValue = $( this ).attr('data-filter'); 21 // use filterFn if matches value 22 filterValue = filterFns[ filterValue ] || filterValue; 23 $grid.isotope({ filter: filterValue }); 24 $.cookie("filterValue", filterValue, {path: '/'}); 25 }); 26 // change is-checked class on buttons 27 $('.button-group').each( function( i, buttonGroup ) { 28 var $buttonGroup = $( buttonGroup ); 29 $buttonGroup.on( 'click', 'button', function() { 30 $buttonGroup.find('.is-checked').removeClass('is-checked'); 31 $( this ).addClass('is-checked'); 32 }); 33 }); 34 35 filter_value = $.cookie('filterValue'); 36 console.log(filter_value); 37 if (filter_value) { 38 $grid.isotope({ filter: filter_value }); 39 $('.button-group button').each( function( i, button ) { 40 $( this ).removeClass('is-checked'); 41 if( $(this).attr("data-filter") == filter_value ) { 42 $( this ).addClass('is-checked'); 43 } 44 }); 45 } 46 }); 47 48 setTimeout( 49 function () { 50 $('.news_list').isotope('layout'); 51 }, 1000 52 ); 53 54 setTimeout( 55 function () { 56 $('.news_list').css("opacity", 1) ; 57 }, 1100 58 ); 59 60 61});
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.