Hi I'm a new jquery user, and I need some help.
I'm trying to change a css :hover attribute of a last child div element upon a click of that div. More specifically, I have a nav-bar div with some child div buttons in it. The child divs are all a par of the same class so that when I hover over them...a border-width attribute changes. I would like it so that when I click last child div, the border color is changed, but still only shows when the mouse is hovering...and when I click it again, I would like the original border attributes defined in the css to retake effect.
Here is a sample of what I'm trying to do:
$("div.navbar:last").click(function(){
if ($("div#details").is(":hidden")){
$("div#details").fadeIn(100);
$("div.navbar:hover").css("border-bottom-color","#ee4444");
} else {
$("div#details").fadeOut(100);
$("div.navbar").css("border-bottom-color","#88ddff");
}
});
Any help is appreciated.