Jquery HELP!!
- Started
- Last post
- 16 Responses
- timkortman
Can someone help me out...I am a total noob when it comes to jquery.
I want my menu to slide down (accordion) when you click and slide up on mouse out (not click).
Here is a link to my current menu. Please look at my code and help me out.
- mikotondria30
try playing with mouseleave, mouseovers can be be tricky and non-bubbly as I understand it..
- timkortman0
can anyone tell me what i need to add to my code to make this work?
- timkortman0
no one?
- ideal0
shhhhhhhhhht. we are sleeping.
- Stugoo0
this is working
$('.menu_body').mouseout(
function() {
$(this).stop().slideToggle('slow...
});
but its a bit buggy.
- Stugoo0
sorryyy
$(this)
.stop()
.slideToggle('slow');
- timkortman0
Still cant get it to work. Can you post the whole JS so I can see where you implemented your solution?
- bulletfactory0
http://jquery.bassistance.de/acc…
there are a few examples of mouseover accordion menus here.
- timkortman0
bullet, I already have an accordion menu in place i just want to know how to make it return to original state on mouse out.
- timkortman0
I am wondering if this can be done with an addition to the current code that I have.
- acescence0
maybe this would work..
- timkortman0
acescence...thank you for the effort, but unfortunately that doesnt work either.
Anyone else want to help me out? Please tell me how to do this. It is getting frustrating!!
- iamaracinghorse0
I would put the nav items in an unordered list, then put the dropdown in an unordered list nested under the dropdown header li element, like so:
<ul id="nav">
<li>first
<ul class="dropdown" style="display:none">
<li>sub-first</li>
<li>sub-second</li>
<li>sub-third</li>
</ul>
</li>
<li>second</li>
<li>third</li>
</ul>Then put a click function and a hover function on the header li element that will show and hide any ul elements inside the header li element, like so:
$('ul#nav li').click(
function(){$('ul.dropdown', this).slideDown()}).hover(null,f...
$('ul.dropdown', this).slideUp();
});I've tried this approach and it worked fine. Does it make sense??
- timkortman0
Can you point me to a working example of this?
- iamaracinghorse0
Here's a working example of it:
http://crookedeyeservices.com/mi…
sorry it took so long to get that too you. I hope you find it useful?