I’m trying to animate a overlay using opacity when you hover the element, however it does not work. I can easily do it without the animation, but I would like to get a fade effect. I’m trying to achieve this with jQuery.
I want the overlay to not be visible when the image is hovered.
Take look at below jsfiddle-example:
I’ve been looking for examples, but most of them use fadeIn and fadeOut, and I can’t use that because the element should always be visible, only the opacity should change on hover.
Solved:
Forgot to enclose the selector. Working example:
http://jsfiddle.net/jem2M/4/
$('.bghover #background img')– you forgot (twice) to enclose your selector into quotes.example fiddle : http://jsfiddle.net/jem2M/4/