1
I need to change the src attribute of an image with jquery. Everything works perfectly, I just need to apply an effect that I am not able to put. I don’t know if the way I did it’s the exact way to get the result I want.
html
<img id="slide" src="img/img.png"/>
<a id="um">um</a>
<a id="dois">dois</a>
<a id="tres">três</a>
jquery
$("body").on("click","#um", function(){
$("#slide").attr("src","img/1.png").fadeIn(2000);
})
$("body").on("click","#dois", function(){
$("#slide").attr("src","img/2.png").fadeIn(2000);
})
$("body").on("click","#tres", function(){
$("#slide").attr("src","img/3.png").fadeIn(2000);
})
great! That’s what it was all about!
– DiChrist