1 2var ww = document.body.clientWidth; 3 4$(document).ready(function() { 5 6 $(".nav li a").each(function() { 7 if ($(this).next().length > 0) { 8 $(this).addClass("parent"); 9 }; 10 }) 11 12 $(".toggleMenu").click(function(e) { 13 e.preventDefault(); 14 $(this).toggleClass("active"); 15 $(".nav").toggle(); 16 }); 17 18 adjustMenu(); 19}) 20 21$(window).bind('resize orientationchange', function() { 22 23 ww = document.body.clientWidth; 24 adjustMenu(); 25}); 26 27var adjustMenu = function() { 28 29 if (ww < 775) { 30 $(".nav").hide(); 31 //$(".toggleMenu").css("display", "inline-block"); 32 //if (!$(".toggleMenu").hasClass("active")) { 33 // $(".nav").hide(); 34 //} else { 35 // $(".nav").show(); 36 //} 37 /* 38 $(".nav li").unbind('mouseenter mouseleave'); 39 $(".nav li a.parent").unbind('click').bind('click', function(e) { 40 // must be attached to anchor element to prevent bubbling 41 e.preventDefault(); 42 43 $(this).parent("li").toggleClass("hover"); 44 }); 45 */ 46 } 47 else if (ww >= 775) { 48 49 //$(".toggleMenu").css("display", "none"); 50 $(".nav").show(); 51 52 $(".nav li").removeClass("hover"); 53 $(".nav li a").unbind('click'); 54 /* 55 $(".nav li").unbind('mouseenter mouseleave').bind('mouseenter mouseleave', function() { 56 // must be attached to li so that mouseleave is not triggered when hover over submenu 57 $(this).toggleClass('hover'); 58 }); 59 */ 60 $(".nav li").unbind('mouseenter').bind('mouseenter', function() { 61 // must be attached to li so that mouseleave is not triggered when hover over submenu 62 $(this).addClass('hover'); 63 }); 64 $(".nav li").unbind('mouseleave').bind('mouseleave', function() { 65 // must be attached to li so that mouseleave is not triggered when hover over submenu 66 $(this).removeClass('hover'); 67 }); 68 69 } 70}
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.