Hi,
I wonder if anyone can help. Is it possible to have a background image change on hover using jquery and also have a fade in effect?
I have been able to do this with images, but now when they are background images on a div.
Hi,
I wonder if anyone can help. Is it possible to have a background image change on hover using jquery and also have a fade in effect?
I have been able to do this with images, but now when they are background images on a div.
You would need to do the following in order to achieve this:
NOTE: To avoid the element collapsing to height: 0 you should wrap a DIV around the child element with a set height and width so that you can change the background on the child element.
Thanks for the quick reply. I have managed to get it working. Your explanation helped me see the problem from a different angle. I took the approach you suggested, but as the original and ‘hover’ images were the same but for their transparency I was able to simplify it even further. Thanks again, I have been staring at this problem for days and was getting nowhere