This is less of a specific problem or error but more of a implementation question.
First of I'd like to say that I've been through a lot of fading image tutorials and I have a basic understanding of the different kinds. I hope this doesn't get thrown out along with the other hundreds of questions about fading images.
This is basically what I would like: An image fading into another image on hover using javascript and preferably jQuery. I would create two images—one named image.jpg and another named image_o.jpg. They would reside in the same folder.
Here's what the html markup would look like:
<img class="imghover" src="image.jpg" />
The javascript would require me to have the imghover
class on all the images that I want to hover. The script would detect the second image named imghover_o.jpg
and use it for the second image in the hover fade transition.
There would be no required CSS or background-image
for the transition.
I will have several of these images in a grid and they will all need to have the fade transition. So, you can see that I do not want to make a new CSS class for every image, or have extra script and html markup that will get cumbersome.
All of the above is achieved with this Daniel Nolan script minus the fade transition. The script just swaps the image with no fade, but it is set up perfectly with minimal code.
So you could say that I just want add a fade transition to the Daniel Nolan rollover script. Is is possible to remake his script using jQuery?
Is this possible (with jQuery)?