1(function($) { 2 3 $(document).mouseup(function(e) { 4 /* var container = $(".vslide"); 5 6 // if the target of the click isn't the container nor a descendant of the container 7 if (!container.is(e.target) && container.has(e.target).length === 0){ 8 closeMenu(container); 9 } */ 10 11 $('.vslide .menu-checkbox:checked').siblings('.menu').removeClass('active'); 12 $('.vslide .menu-checkbox:checked').last().siblings('.menu').addClass('active'); 13 14 }); 15 16 function closeMenu(container){ 17 container.find("input").each(function(){ 18 $(this).prop('checked', false); 19 }); 20 container.removeClass('active'); 21 $('html').removeClass("stop-scroll"); 22 } 23 function backButtonClick(){ 24 25 var buttons = $(".vslide .vslide-backbutton"); 26 buttons.each(function(){ 27 $(this).click(function(){ 28 $(this).parent().parent().parent().find(".menu-checkbox").prop('checked', false); 29 }) 30 }) 31 } 32 function backgroundClick(){ 33 $(".vslide").click(function(){ 34 closeMenu($(this)); 35 }); 36 $(".vslide>nav").click(function(e){ 37 e.stopPropagation(); 38 }) 39 } 40 41 function onLoadActive(){ 42 var active = $(".vslide li.active"); 43 var activate = active.parent().parent().siblings(".menu-checkbox").prop('checked', true); 44 while( activate.parent().parent().parent().siblings(".menu-checkbox").length >0 ){ 45 activate = activate.parent().parent().parent().siblings(".menu-checkbox").prop('checked', true); 46 } 47 } 48 49 function mobileDrag(){ 50 51 } 52 function closeButtonClick(){ 53 var container = $(".vslide"); 54 var buttons = container.find(".vslide-closebutton"); 55 buttons.each(function(){ 56 $(this).click(function(){ 57 closeMenu(container); 58 }) 59 }); 60 61 } 62 $(document).ready(function(){ 63 64 65 $('.vslide>nav>.menu-checkbox').change(function(){ 66 onLoadActive(); 67 $('.vslide .menu-checkbox:checked').siblings('.menu').removeClass('active'); 68 $('.vslide .menu-checkbox:checked').last().siblings('.menu').addClass('active'); 69 70 $('.vslide').each(function(){ 71 if($(this).children('nav').children(".menu-checkbox").is(":checked")){ 72 $(this).addClass("active"); 73 $('html').addClass("stop-scroll"); 74 }else{ 75 $(this).removeClass("active"); 76 $('html').removeClass("stop-scroll"); 77 } 78 }); 79 }) 80 $('.vslide').each(function(){ 81 var container= $(this); 82 $(this).find('.vslide-close-helper').click(function(){ 83 closeMenu(container); 84 }) 85 }); 86 87 88 89 $('.vslide .menu-checkbox:checked').siblings('.menu').removeClass('active'); 90 $('.vslide .menu-checkbox:checked').last().siblings('.menu').addClass('active'); 91 92 93 94 backButtonClick(); 95 closeButtonClick(); 96 backgroundClick(); 97 mobileDrag(); 98 }) 99 100 101})(jQuery); 102 103 104
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.