1$(function() { 2 var timeoutID = null; 3 4 if(!isPcDesign()){ 5 toggleNav(); 6 } 7 8 function toggleNav() { 9 toggleTimerFadeOut(); 10 11 $('.menu-toggle').click(function() { 12 if($('.menulist').is(':visible')) { 13 $('.menulist').slideUp('fast'); 14 toggleTimerFadeOut(); 15 } else { 16 $('.menulist').slideDown('fast'); 17 toggleFadeOutTimerCancel(); 18 } 19 }); 20 21 $('.dropdown-menu').click(function(event) { 22 var $parent = $(this).parent(); 23 $parent.find('.childm').slideToggle('fast'); 24 if($parent.hasClass('m_close')) { 25 $parent.removeClass('m_close'); 26 $parent.addClass('m_open'); 27 } else { 28 $parent.removeClass('m_open'); 29 $parent.addClass('m_close'); 30 } 31 event.preventDefault(); 32 }); 33 34 $(window).scroll(function() { 35 toggleFadeOutTimerCancel(); 36 if($('.menu-toggle').is(':hidden')) { 37 toggleFadeIn('fast'); 38 } 39 toggleTimerFadeOut(); 40 }); 41 42 function toggleTimerFadeOut() { 43 if(document.documentElement.scrollHeight < document.documentElement.clientHeight) return; 44 timeoutID = setTimeout(function () { 45 if(!isPcDesign()) { 46 $('.menu-toggle').fadeOut(); 47 $('.menulist').fadeOut(); 48 } 49 }, 5000); 50 } 51 52 function toggleFadeIn(duration) { 53 duration = duration ? duration : 'normal'; 54 $('.menu-toggle').fadeIn(duration); 55 } 56 } 57 58 function toggleFadeOutTimerCancel() { 59 if(timeoutID) clearTimeout(timeoutID); 60 } 61 62 function isPcDesign() { 63 return $(window).width() >= 850; 64 } 65 66});
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.