I have written the following code:
$(document).ready(function () {
$("#rade_img_map_1335199662212").hover(function () {
$("li#rs1").addClass("active"); //Add the active class to the area is hovered
}, function () {
$("li#rs1").addClass("not-active");
});
});
The problem is it doesnt seem to toggle the class on hover?
But how can i get it so that the class toggles based on hover and non-hover..?
Do not add a different class on hover-out just remove the
activeclassor if all elements are inactive at first you could use a single function and the
toggleClass()method