1// page init 2jQuery(function() { 3 initOpenClose(); 4}); 5 6// open-close init 7function initOpenClose() { 8 9 jQuery('.category-box li').openClose({ 10 activeClass: 'expanded', 11 opener: '.opener', 12 slider: 'div.drop', 13 effect: 'slide', 14 animSpeed: 500 15 }); 16 17 $(".opener-t").click(function (e) { 18 if (window.innerWidth > 1170) { 19 if ($(this).hasClass('activemenu')) { 20 //$(this).parent().children('.opener02').click(); 21 return false; 22 } else { 23 //$(this).parent().children('.opener02').click(); 24 } 25 } else { 26 //$(this).parent().children('.opener02').click(); 27 //return false; 28 } 29 }); 30 31 $(".opener01").click(function (e) { 32 if (window.innerWidth <= 1170) { 33 $(this).parent().children('.opener').click(); 34 return false; 35 } 36 }); 37 38 if (window.innerWidth <= 1170) { 39 jQuery('.category-box ul ul li').openClose({ 40 activeClass:'expanded02', 41 opener:'.opener02', 42 slider:'.drop-box', 43 effect:'slide', 44 animSpeed:500 45 }); 46 } 47} 48 49 50/* 51 * jQuery Open/Close plugin 52 */ 53;(function($){ 54 $.fn.openClose = function(o){ 55 // default options 56 var options = $.extend({ 57 addClassBeforeAnimation: true, 58 activeClass:'active', 59 opener:'.opener', 60 slider:'.slide', 61 animSpeed: 400, 62 animStart:false, 63 animEnd:false, 64 effect:'fade', 65 event:'click' 66 },o); 67 68 return this.each(function() { 69 // options 70 var holder = $(this), animating; 71 var opener = $(options.opener, holder); 72 var slider = $(options.slider, holder); 73 if(slider.length) { 74 opener.bind(options.event,function() { 75 if(!animating) { 76 animating = true; 77 if (typeof options.animStart === 'function') { 78 options.animStart(); 79 } 80 81 //activeClass 82 if (options.activeClass != 'expanded02') { 83 if (opener.parent().hasClass('expanded')) { 84 85 } else { 86 //$('.drop').slideUp(500); 87 //$('.category-list li').removeClass('expanded'); 88 } 89 } 90 91 if (holder.hasClass('expanded02')) { 92 93 } else { 94 // $('.drop-box').slideUp(500); 95 // $('.level-2').removeClass('expanded02'); 96 holder.closest('li').find('.drop-box').slideUp(500); 97 holder.closest('li').removeClass('expanded02'); 98 } 99 100 if(holder.hasClass(options.activeClass)) { 101 toggleEffects[options.effect].hide({ 102 speed: options.animSpeed, 103 box: slider, 104 complete: function() { 105 animating = false; 106 if(!options.addClassBeforeAnimation) { 107 holder.removeClass(options.activeClass); 108 } 109 if(typeof options.animEnd === 'function') options.animEnd(); 110 } 111 }); 112 if(options.addClassBeforeAnimation) { 113 holder.removeClass(options.activeClass); 114 } 115 } else { 116 if(options.addClassBeforeAnimation) { 117 holder.addClass(options.activeClass); 118 } 119 toggleEffects[options.effect].show({ 120 speed: options.animSpeed, 121 box: slider, 122 complete: function() { 123 animating = false; 124 if(!options.addClassBeforeAnimation) { 125 holder.addClass(options.activeClass); 126 } 127 if(typeof options.animEnd === 'function') options.animEnd(); 128 } 129 }) 130 } 131 } 132 return false; 133 }); 134 if (holder.hasClass(options.activeClass)) { 135 slider.show(); 136 } else { 137 slider.hide(); 138 } 139 } 140 }); 141 }; 142 143 // animation effects 144 var toggleEffects = { 145 slide: { 146 show: function(o) { 147 o.box.slideDown(o.speed, o.complete); 148 }, 149 hide: function(o) { 150 o.box.slideUp(o.speed, o.complete); 151 } 152 }, 153 fade: { 154 show: function(o) { 155 o.box.fadeIn(o.speed, o.complete); 156 }, 157 hide: function(o) { 158 o.box.fadeOut(o.speed, o.complete); 159 } 160 }, 161 none: { 162 show: function(o) { 163 o.box.show(0, o.complete); 164 }, 165 hide: function(o) { 166 o.box.hide(0, o.complete); 167 } 168 } 169 } 170 171 172 173}(jQuery)); 174 175 176$(document).ready(function () { 177 178 if ($(".category-list li").hasClass("expanded")) { 179 $(".category-list li").eq(0).addClass("expanded"); 180 //$(".category-list .expanded .drop").slideDown(500); 181 } 182 183 // ÐÑкÑÑÑие/закÑÑÑие ÑилÑÑÑа 184 $('.filter-form .options').click(function () { 185 $(".chosen-select").chosen('destroy'); 186 $(".chosen-select").chosen({width: '164px'}); 187 if ($(this).hasClass('options-up')) {
188 $('.filter-drop').slideUp('500'); 189 $(this).removeClass('options-up'); 190 } else { 191 $('.filter-drop').slideDown('500'); 192 $(this).addClass('options-up'); 193 } 194 }); 195 196});
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.