1jQuery(document).ready(function($) { 2 3 $(".mobile-category").click(function(){ 4 $(".filterable-category .tabs").slideToggle(); 5 $(this).find('.mobile-category_icon').toggleClass('open'); 6 }); 7 8}); 9 10(function() { 11 12 jQuery(function() { 13 var toggle; 14 return toggle = new Toggle('.toggle'); 15 }); 16 17 this.Toggle = (function() { 18 Toggle.prototype.el = null; 19 20 Toggle.prototype.tabs = null; 21 22 Toggle.prototype.panels = null; 23 24 function Toggle(toggleClass) { 25 this.el = jQuery(toggleClass); 26 this.tabs = this.el.find(".tab"); 27 this.panels = this.el.find(".panel"); 28 this.bind(); 29 } 30 31 Toggle.prototype.show = function(index) { 32 var activePanel, activeTab; 33 this.tabs.removeClass('active'); 34 activeTab = this.tabs.get(index); 35 jQuery(activeTab).addClass('active'); 36 this.panels.hide(); 37 activePanel = this.panels.get(index); 38 jQuery(activePanel).show(); 39 if( jQuery(window).outerWidth() < 981 ) { 40 // Height 41 let maxHeight = jQuery('.toggle .panels').outerHeight(); 42 jQuery('.filterable-category .tabs .tabs-wrap').css('max-height', maxHeight + 'px'); 43 } 44 45 return; 46 }; 47 48 Toggle.prototype.bind = function() { 49 var _this = this; 50 return this.tabs.unbind('click').bind('click', function(e) { 51 52 if( jQuery(window).outerWidth() < 981 ) { 53 jQuery('.mobile-category .mobile-category_name').text( jQuery(this).text() ); 54 jQuery('.filterable-category .tabs').slideToggle(); 55 jQuery('.mobile-category .mobile-category_icon').toggleClass('open'); 56 } 57 return _this.show(jQuery(e.currentTarget).index()); 58 }); 59 }; 60 61 return Toggle; 62 63 })(); 64 65}).call(this);
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.