Here is my menu
I'm totally new in jQuery. The accordion-menu I created works nice if the mouse comes from the bottom, but if the mouse comes from the top, it isn't functional.
Do you know a trick to let the mouseover stay, while the mouse comes from the top?
Many thanx!
function Accordion() {
$('.accordion ul').hide(); // hide all unordered lists inside the accordion list
//$('.accordion ul:first').show(); //show the first unordered list inside the accordion
$('.accordion li a').mouseover(
function() {
var checkElement = $(this).next();
if((checkElement.is('ul')) && (checkElement.is(':visible'))) {
//list is opened...
return false; // -> stay visible
}
if((checkElement.is('ul')) && (!checkElement.is(':visible'))) {
//list is closed...
$(this).next().slideToggle('slow'); // -> open invisible (slideDown)
return false;
}
}
);
}
$(document).ready(function() {Accordion();}); //when the document is ready to load "is" the script iniciates the function

New Topic/Question
Reply


MultiQuote


|