[jQuery] Keeping Submenu Open?
Hello all,
I have a menu with a submenu using jQuery. The problem is I am trying
to get the submenu to stay open after you have clicked on the sub menu
item. So, to have the sub menu open on the active top menu place but
clear when there is no submeu.
After hours of searching, I cannot find out how to make this happen.
I know it can be done but da nada. I am pretty sure it somehow uses
cookies and I have never had to code cookies before so I am a bit
stuck.
Please can anyone help??
This is what I'm using:
===============
$(document).ready(function() {
$("#nav ul").removeClass("nj");
$("#nav ul li").hover(
function () {
$(this).addClass("hovering");
if ( $(this).hasClass("hovering") ){
var dropdown_width = $(this).width();
var paddingright = $(this).css("padding-right");
var paddingleft = $(this).css("padding-left");
$(this).find(".dropdown_menu").css("min-width",dropdown_width);
/*$(this).find(".dropdown_menu").hide();*/
$(this).find(".dropdown_menu").queue("fx",[]);
$(this).find(".dropdown_menu").slideDown("fast");
;}},
function () {
$(this).find(".dropdown_menu").hide();
$(this).removeClass("hovering");
});
});
=============