1jQuery(document).ready(function($){ 2 // DROPDOWNS 3 var runDropdowns = function(){ 4 var dropdown = $('.dropdown-banner'); 5 var prevTrigger = ''; 6 var prevDropdown = ''; 7 var prevID = ''; 8 var dropIDs = []; 9 10 dropdown.each(function(){ 11 var currentDropdown = $(this); 12 var dropdownTrigger = currentDropdown.data('trigger'); 13 14 $('.' + dropdownTrigger).mouseenter(function(){ 15 var thisID = $(this).attr('id'); 16 17 dropIDs.push(thisID); 18 19 if(prevTrigger){ 20 prevID = prevTrigger.attr('id'); 21 } 22 23 if(prevID !== thisID && prevDropdown !== '') { 24 prevDropdown.fadeOut(200); 25 } 26 27 prevTrigger = $(this); 28 currentDropdown.fadeIn(200); 29 prevDropdown = currentDropdown; 30 }); 31 32 currentDropdown.mouseleave(function(){ 33 currentDropdown.fadeOut(200); 34 }); 35 }); 36 37 $('.menu-item').mouseenter(function(){ 38 var currentMenuItemID = $(this).attr('id'); 39 if($.inArray(currentMenuItemID, dropIDs) < 0 && prevDropdown !== ''){ 40 prevDropdown.fadeOut(200); 41 } 42 }); 43 44 $('#site-navigation-wrap').mouseleave(function(){ 45 prevDropdown.fadeOut(200); 46 }); 47 48 49 $(window).scroll(function(){ 50 $('.dropdown-banner').fadeOut(200); 51 }); 52 53 54 55 $('#subscribe-wrapper-nav').mouseenter(function(){ 56 $('#dropdown-banner').fadeToggle(200); 57 }); 58 59 $('#subscribe-banner').mouseleave(function(){ 60 $('#dropdown-banner').fadeToggle(200); 61 }); 62 } 63 64 runDropdowns(); 65});
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.