I'm looking at the code from this: http://www.javascriptkit.com/script/script2/jkmegamenu.shtml
I would like to modify the code to make the menu drop up instead of drop down. Can anyone help me with this? Thanks!
I'm looking at the code from this: http://www.javascriptkit.com/script/script2/jkmegamenu.shtml
I would like to modify the code to make the menu drop up instead of drop down. Can anyone help me with this? Thanks!
var menuleft=($(window).width()-(megamenu.offsetx-$(document).scrollLeft())>megamenu.actualwidth)? megamenu.offsetx : megamenu.offsetx-megamenu.actualwidth+megamenu.anchorwidth //get x coord of menu
var menutop=megamenu.offsety+megamenu.anchorheight //get y coord of menu
These two lines (from jkmegamenu.js
) assign values which are later used to position the menu when it is shown. menutop
is the distance from the top edge of the window, menuleft
the distance from the left edge. Playing with how these values are calculated will allow you to display the menu at any old coordinate you please :)
Good luck!