...

View Full Version : Jquery toggle css



twodayslate
11-22-2008, 04:29 AM
Hello, just started jquery today.

I have a menu that when an item is hovered a sub menu comes up. What I want is that when you click on the menu the submenu stays up.

right now toggle sorta works but it does not stay up when I stop hovering over the item.


<script type="text/javascript">
$(document).ready( function()
{
$('.m').click( function()
{
$('.m ul').toggle();
});

});
</script>
http://avoki.com/

thanks

twodayslate
11-22-2008, 07:51 PM
fixed avoki so it actually toggles now.

Do you understand what I am asking?

edit:// a little closer http://stackoverflow.com/questions/308411/jquery-how-do-i-fix-this-image-rollover

$('.m ul').hide();

$('.m').bind("mouseenter", (function()
{
$('.m ul').hide()
}));
$('.m').click( function()
{
$('.m ul').toggle();
});but it does not stay up...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum