I have a jQuery code that works perfect when you hover on the div.
$(function() {
jQuery('#div-to-hover').hover(function(){
jQuery('#my-background-image').css("background-image", "url(active.png)");
});
});
I want to change it so that when it is hovered, then active.png is the background-image. If not hovered, then it becomes normal.png.
1 Answer