1(function($) { 2$(document).ready(function(){ 3 var cbpHorizontalMenu = (function() { 4 5 var $listItems = $( '#cbp-hrmenu > ul > li' ), 6 $menuItems = $listItems.children( '.sf-depth1' ), 7 $body = $( 'body' ), 8 current = -1; 9 10 function init() { 11 $menuItems.on( 'mouseenter', open ); 12 // $listItems.on( 'click', function( event ) { event.stopPropagation(); } ); //disable default click on link behaviour 13 } 14 15 function open( event ) { 16 17 if( current !== -1 ) { 18 $listItems.eq( current ).removeClass( 'cbp-hropen' ); 19 } 20 21 var $item = $( event.currentTarget ).parent( 'li' ), 22 idx = $item.index(); 23 24 if( current === idx ) { 25 $item.removeClass( 'cbp-hropen' ); 26 current = -1; 27 } 28 else { 29 $item.addClass( 'cbp-hropen' ); 30 current = idx; 31 // $body.off( 'click' ).on( 'hover', close ); //not needed when using mouseenter 32 } 33 34 return false; 35 36 } 37 38 function close( event ) { 39 $listItems.eq( current ).removeClass( 'cbp-hropen' ); 40 current = -1; 41 } 42 43 return { init : init }; 44 45 })(); 46 cbpHorizontalMenu.init(); 47}); 48 49})(jQuery);
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.