Sorry if this is already posted, but I really need your help.
What I want is following:
Let’s say I have this image as normal image that can be clicked.
https://i.stack.imgur.com/pGYyG.png
Now let’s say, when I click on that image it will fade this image:
https://i.stack.imgur.com/bUPmP.png
Can anyone tell me how to code this on click image selection ? Or if it cannot be onclick then how else, please?
EDIT:
Also I forgot to mention. If I have 2 selecting choices…
And if I click one choice it fades in and if I select choice 2, choice 1 should fade out and choice 2 fade in like it should…
Presuming by fade, you mean an animated fade, you can use the following code:
HTML:
jQuery:
This will show the default image to start off with, then fade out to show the background image of it’s container when clicked. You may decide to use different HTML elements depending on your situation.