I know I have already done a fade effect between two images with jQuery, but here is a quick little piece of code that will just add a nice animated fade effect to single images. Whenever a person hovers over an image, we will use jQuery to lower the opacity to make it appear lighter. Easy and not that impressive but still pretty cool.
Make sure you first call jQuery.
Make sure you first call jQuery.
Then just add the following code and all your images will have a slight fade when you hover over them.
If you only want this to occur on certain images than just make sure to change the first jQuery selector to the class name of the images your want this effect to affect.
Try it out below:
I have used this jQuery to animate my buttons and logo etc. on my website.
ReplyDeleteI want SOME of the images to remain as images and not have this effect on them.
Is there any code that I can put in to disable this script from effecting all of the images?
Thanks in advance,
Chris