1jQuery(document).ready(function ($) { 2 3 //On Hover Over 4 function megaHoverOver() { 5 $(this).addClass('mmItemHover').find(".megaborder").stop().show(); //Find sub and fade it in 6 setDimensions($(this)); 7 } 8 9 //On Hover Out 10 function megaHoverOut() { 11 $(this).removeClass('mmItemHover').find(".megaborder").stop().fadeOut('fast', function () { //Fade to 0 opactiy 12 $(this).hide(); //after fading, hide it 13 }); 14 } 15 16 //Set dimensions of the dropdown 17 function setDimensions(obj) { 18 maxWidth = 0; 19 maxHeight = 0; 20 numColumns = 0; 21 maxColumns = 3; // set to desired number of colummns 22 //Calculate widest category 23 obj.find("li.category").each(function () { //for each ul... 24 numColumns++; 25 maxWidth = ($(this).width() > maxWidth) ? $(this).width() : maxWidth; //Check current category width against largest width 26 }); 27 maxWidth = (numColumns > maxColumns) ? (maxWidth * maxColumns) : (maxWidth * numColumns); 28 29 //Calculate tallest category 30 obj.find("li.category").each(function () { //for each ul... 31 maxHeight = ($(this).height() > maxHeight) ? $(this).height() : maxHeight; //Check current category height against largest height 32 }); 33 34 obj.find(".megaborder").css({ 'width': maxWidth + 20 }); //Set Width 35 obj.find("li.category").each(function() { 36 var thisPosition = $(this).index() + 1; // node position of category 37 if (thisPosition % 3 == 0) { 38 $(this).addClass("mmRightColumn"); 39 } 40 }).css({ 'height': maxHeight }); 41 } 42 43 //Set custom configurations 44 var config = { 45 sensitivity: 2, // number = sensitivity threshold (must be 1 or higher) 46 interval: 100, // number = milliseconds for onMouseOver polling interval 47 over: megaHoverOver, // function = onMouseOver callback (REQUIRED) 48 timeout: 100, // number = milliseconds delay before onMouseOut 49 out: megaHoverOut // function = onMouseOut callback (REQUIRED) 50 }; 51 52 //Trigger Hover intent with custom configurations 53 $("ul.dnnmega li.mmHasChild").hoverIntent(config); 54 55 //Trigger Touch Start event 56 var firstTouch = true; 57 $("ul.dnnmega li.mmHasChild").bind("touchstart", 58 function(){ 59 if (firstTouch){ 60 firstTouch = false; 61 setDimensions($(this)); 62 $(this).find(".megaborder").stop().show(); //Find sub and fade it in 63 return false; 64 } 65 } 66 ); 67});
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.