The following code:
<script type="text/javascript" >
$("#accordion > li > div").hover(function () {
if (false == $(this).next().is(':visible')) {
$('#accordion ul').slideUp(300);
}
$(this).next().slideToggle(300);
});
</script>
When the user hovers over the li>div item it will cascade down but by the time i see the options it will cascade back up.
edit: the slide up speed seems to work nice at 300 miliseconds but i want to keep it display for 3 secodns then roll back up?
How do i hold the cascade for the a few seconds? so that the user can click on an li item?
EDIT: ADDED MY JSFIDDLE – http://jsfiddle.net/dttdB/
New Answer
allright, sounds like you’re new to javascript. Congrats on finding jQuery, it will definitely be a close friend of yours!! Now I’ll show you jQuery-ui accordion
css
html
javascript
Old Answer
with some html i can give a better answer, but in general i think you need to bind to both function() options in .hover()
js-fiddle
I think i did this right