RipzCurlz
11-15-2009, 10:29 AM
Heres my full jQuery code for this accordion,
$(document).ready(function() {
$('div.accordionButton').mouseover(function() {
$('div.accordionContent').hide('fast');
$(this).next().slideDown('normal');
});
$('div.accordionContent').mouseout(function() {
$("div.accordionContent").slideUp('normal');
});
$("div.accordionContent").hide('fast');
});
And heres my problem:
$('div.accordionContent').mouseout(function() {
$("div.accordionContent").slideUp('normal');
});
I have it set so that when a user moves the mouse off the div.accordionContent the content slides up.
In div.accordionContent there are multiple <a> tags listed, and when i hover over one of these <a> tags that are inside the div.accordionContent,
the content slides up before i get a chance to click on one of the listed <a> links.
So im assuming this is because moving the mouse onto the <a> tag is technically mousing out of div.accordionContent and therefore sliding the list up.
My jQuery syntax knowledge is limited, so i will try explain to the best of my ability what i want to do:
Somehow include the <a> tags in the mouseout function above so that when a user hovers over the <a> tags which are (children of div.accordionContent) the list doesnt slide up,
because it recognizes that they are part of the div.
$(document).ready(function() {
$('div.accordionButton').mouseover(function() {
$('div.accordionContent').hide('fast');
$(this).next().slideDown('normal');
});
$('div.accordionContent').mouseout(function() {
$("div.accordionContent").slideUp('normal');
});
$("div.accordionContent").hide('fast');
});
And heres my problem:
$('div.accordionContent').mouseout(function() {
$("div.accordionContent").slideUp('normal');
});
I have it set so that when a user moves the mouse off the div.accordionContent the content slides up.
In div.accordionContent there are multiple <a> tags listed, and when i hover over one of these <a> tags that are inside the div.accordionContent,
the content slides up before i get a chance to click on one of the listed <a> links.
So im assuming this is because moving the mouse onto the <a> tag is technically mousing out of div.accordionContent and therefore sliding the list up.
My jQuery syntax knowledge is limited, so i will try explain to the best of my ability what i want to do:
Somehow include the <a> tags in the mouseout function above so that when a user hovers over the <a> tags which are (children of div.accordionContent) the list doesnt slide up,
because it recognizes that they are part of the div.