Is there a way to dynamically adjust the z-index of an img element when hovered over? I want the z-index to be 0 when the mouse pointer is outside of the image, and 9 when hovering over it.
I know how to initially set the z-index, but need help with changing it on hover.
$('#content img').hover(function () {
$(this).css("z-index", "9")
}, function() {
$(this).css("z-index", "0")
});