1 jQuery(document).ready(function(){ 2 jQuery("ul.sf-menu").supersubs({ 3 minWidth: 12, // minimum width of sub-menus in em units 4 maxWidth: 24, // maximum width of sub-menus in em units 5 extraWidth: 1 // extra width can ensure lines don't sometimes turn over 6 }).superfish({ 7 delay: 200, 8 speed: 'fast' 9 }); // call supersubs first, then superfish, so that subs are 10 // not display:none when measuring. Call before initialising 11 // containing tabs for same reason. 12 var windowWidth; 13 windowWidth= jQuery(window).width(); 14 jQuery( window ).resize(function() { 15 windowWidth = jQuery(window).width(); 16 }); 17 18 jQuery('.sf-menu').superfish({ 19 onBeforeShow : function (){ 20 if(!this.is('.sf-menu>li>ul')){ 21 var subMenuWidth = jQuery(this).width(); 22 var parentLi = jQuery(this).parent(); 23 var parentWidth = parentLi.width() -8 ; 24 var subMenuRight = parentLi.offset().left + parentWidth + subMenuWidth; 25 if(subMenuRight > windowWidth){ 26 jQuery(this).css('left','auto'); 27 jQuery(this).css('right', parentWidth+'px'); 28 } else { 29 jQuery(this).css('right','auto'); 30 parentWidth +=8; 31 jQuery(this).css('left', parentWidth+'px'); 32 } 33 } 34 } 35 }); 36 });
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.