1(function($) { 2 "use strict"; 3 4 $.ProRadioVideogallery = { 5 6 fn: { 7 body: $("body"), 8 window: $(window), 9 document: $(document), 10 11 /**==================================================================== 12 * 13 * Functions to run once on first page load 14 * 15 ====================================================================*/ 16 init: function() { 17 $(this.body).on('click', '.proradio-videogalleries__filters a', function(e) { 18 e.preventDefault(); 19 var that = $(this); 20 var layout = that.closest('.proradio-videogalleries'); 21 22 // Remove 'active' class from other filters and add it to the current filter 23 layout.find('.proradio-videogalleries__filters a').removeClass("active"); 24 that.addClass("active"); 25 26 // Get the filter ID 27 var filter_id = that.attr("data-videogalleries-filter"); 28 29 // Show all items if the filter is 'all' 30 if (filter_id === 'all') { 31 layout.find('.proradio-videogalleries-col').fadeOut(200, function() { 32 $(this).show().fadeIn(200); 33 }); 34 } else { 35 // Hide items that don't match and show only matching items 36 layout.find('.proradio-videogalleries-col').each(function() { 37 var item = $(this); 38 var filterIds = item.attr("data-videogallery-filterids"); 39 40 if (filterIds && filterIds.indexOf(filter_id) !== -1) { 41 item.stop(true, true).fadeOut(200, function() { 42 $(this).fadeIn(200); 43 }); 44 } else { 45 item.stop(true, true).fadeOut(200); 46 } 47 }); 48 } 49 }); 50 } 51 } 52 53 }; 54 55 /**==================================================================== 56 * 57 * Page Ready Trigger 58 * 59 ====================================================================*/ 60 $(document).ready(function() { 61 $.ProRadioVideogallery.fn.init(); 62 }); 63 64})(jQuery);
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.