1/*jshint jquery:true */ 2/*global $:true */ 3 4var $ = jQuery.noConflict(); 5 6$(document).ready(function($) { 7 "use strict"; 8 9 /*-------------------------------------------------*/ 10 /* = Isotope 11 /*-------------------------------------------------*/ 12 var winDow = $(window); 13 // Needed variables 14 var $container=$('.filter-container'); 15 var $filter=$('.filter'); 16 17 try{ 18 $container.imagesLoaded( function(){ 19 $container.show(); 20 $container.isotope({ 21 filter:'*', 22 layoutMode:'fitRows', 23 animationOptions:{ 24 duration:750, 25 easing:'linear' 26 }, 27 transformsEnabled: false //Disable transformations 28 }); 29 }); 30 } catch(err) { 31 } 32 33 winDow.on('resize', function(){ 34 var selector = $filter.find('a.active').attr('data-filter'); 35 36 try { 37 $container.isotope({ 38 filter : selector, 39 animationOptions: { 40 duration: 750, 41 easing : 'linear', 42 queue : false, 43 } 44 }); 45 } catch(err) { 46 } 47 return false; 48 }); 49 50 // Isotope Filter 51 $filter.find('a').on('click', function(){ 52 var selector = $(this).attr('data-filter'); 53 54 try { 55 $container.isotope({ 56 filter : selector, 57 animationOptions: { 58 duration: 750, 59 easing : 'linear', 60 queue : false, 61 } 62 }); 63 } catch(err) { 64 65 } 66 return false; 67 }); 68 69 70 var filterItemA = $('.filter a'); 71 72 filterItemA.on('click', function(){ 73 var $this = $(this); 74 if ( !$this.hasClass('active')) { 75 filterItemA.removeClass('active'); 76 $this.addClass('active'); 77 } 78 }); 79 80 81 $('.filter a').on('click', function(e) { 82 83 // This will prevent the default action of the anchor 84 event.preventDefault(); 85 86 // Failing the above, you could use this, however the above is recommended 87 return false; 88 89 }); 90 91 92 93});
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.