1$(document).ready(function() { 2 3 $('.menu-icon').click(function() { 4 $(this).parent().toggleClass('is-tapped'); 5 $('#hamburger').toggleClass('open'); 6 }); 7 8 // handle touch device events on drop down, first tap adds class, second navigates 9 $('.touch .sitenavigation li.nav-dropdown > a').on('touchend', 10 function(e) { 11 if ($('.menu-icon').is(':hidden')) { 12 var parent = $(this).parent(); 13 $(this).find('.clicked').removeClass('clicked'); 14 if (parent.hasClass('clicked')) { 15 window.location.href = $(this).attr('href'); 16 } else { 17 $(this).addClass('linkclicked'); 18 19 // close other open menus at this level 20 $(this).parent().parent().find('.clicked').removeClass('clicked'); 21 22 parent.addClass('clicked'); 23 e.preventDefault(); 24 } 25 } 26 }); 27 28 // handle the expansion of mobile menu drop down nesting 29 $('.sitenavigation li.nav-dropdown').click( 30 function(event) { 31 if (event.stopPropagation) { 32 event.stopPropagation(); 33 } else { 34 event.cancelBubble = true; 35 } 36 37 if ($('.menu-icon').is(':visible')) { 38 $(this).find('> ul').toggle(); 39 $(this).toggleClass('expanded'); 40 } 41 } 42 ); 43 44 // prevent links for propagating click/tap events that may trigger hiding/unhiding 45 $('.sitenavigation a.nav-dropdown, .sitenavigation li.nav-dropdown a').click( 46 function(event) { 47 if (event.stopPropagation) { 48 event.stopPropagation(); 49 } else { 50 event.cancelBubble = true; 51 } 52 } 53 ); 54 55 // javascript fade in and out of dropdown menu 56 $('.no-touch .sitenavigation li').hover( 57 function() { 58 if (!$('.menu-icon').is(':visible')) { 59 $(this).find('> ul').fadeIn(100); 60 } 61 }, 62 function() { 63 if (!$('.menu-icon').is(':visible')) { 64 $(this).find('> ul').fadeOut(100); 65 } 66 } 67 ); 68});
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.