Tags
Recently I’ve used jQuery Mega Menu on a site. The default style for this menu it appear from left corner to below the link/button when mouse is over. But I wanted it appear above the link/button when mouse is over, here is the code we need to change on line 76 of jkmegamenu.js file
//existing line // megamenu.offsety= megamenu.$anchorobj.offset().top //Change to megamenu.offsety= megamenu.$anchorobj.offset().top - (megamenu.$menuobj.outerHeight() + megamenu.$anchorobj.outerHeight())
Just subtract top position with total of menu object height and anchor so the bottom line of new box will appear just above the link/button.
But I got some problem when I was adding this code to a page where already have jQuery UI items, both jquery ui tabs/accordion/dialog…etc. and mega menu wasn’t work. After check the mega menu js file I got the solution, we just need to comemnted out or remove the following line at the begianing of file
//jQuery.noConflict();
Done, everything working with me properly hope it will work with you as well 🙂
Have you managed to sort the alignment problem when screen is small.
THANK YOU!!!! i’ve been searching for a solution for days on why my buttons wouldnt style with jquery ui. You comment on removing the noconflict line worked a treat! Keep up the good work!
Thanks a lot! I commented out the line and it worked.
Thank you!!! I had the no conflict problem as well. This fixed it!
GOD BLESS YOU, Sarwar. I had the no conflict problem too, and your tip cane right in time.
Thanks a lot, you save me just in time…