my jquery code:
$(document).ready(function() {
$("#adminbar").mouseover(function () {
$(this).addClass("adm_bar").slideDown("slow");
});
$("#adminbar").mouseout(function () {
$(this).removeClass("adm_bar").slideUp("slow");
});
});
But when you hover the div with #adminbar, it only adds/removes the class once, if you try to do it again, it wont work. I want you to be able to hover it as many times as you want.
Whats wrong?
Edit: its on the top of the page, My website(under construction)
Looks like when you use the slideUp, jQuery automatically sets the display to none, so you can’t hover an element that doesn’t “exist” – it is still there but not “hoverable”.
After the slideUp try adding a display : “block” property and visibility: “hidden”.
You should be able to hover the element that way.