smitty62
asked on
Problem with jquery hover change
I have two problems with a hover on a menu. First I need the color of the text to stay yellow when it is selected. When the mouse moves off of it I want it to stay yellow, and I'm not sure what to add to the jquery script to do that. The panel selected stayes but the color doesn't. I'm not sure what to add in the script.
The other only happens if you are moving the mouse from right to left over the menu categories. When you get to "The Latest" category on the menu, it won't change until you are past it, but it will if you move the mouse from above or below. It's almost like the hot spot doesn't quite work when going from right to left over it.
http://insurance.illinois.gov/intranewdefault/
The other only happens if you are moving the mouse from right to left over the menu categories. When you get to "The Latest" category on the menu, it won't change until you are past it, but it will if you move the mouse from above or below. It's almost like the hot spot doesn't quite work when going from right to left over it.
http://insurance.illinois.gov/intranewdefault/
Doh, forgot a period in my javascript. Use this:
$(document).ready(function(){
$(".parent").hover(function(){
$(".parent").removeClass('hover');
$(".menu_area").hide();
$(this).addClass('hover').find(".menu_area").show();
});
});
ASKER
Thanks, that worked for the yellow highlight. I also still have the other problem with "The Latest" category. Would you prefer that I right up that question separately and submit it again.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sorry Designbyonyx, I should have checked it with the validator first. I got it working. Thank you.
Open in new window
to this:
Open in new window
And change your javascript to this:
$(document).ready(function
$(".parent").hover(functio
$(".parent").removeClass('
$(".menu_area").hide();
$(this)addClass('hover').f
});
});