mercredi 25 février 2015

Replace images by others with javascript

How can I replace images by others with javascript please ?


I've tried but something is wrong





if ($(".grimm")) {
$('.ch').
html(
$('.ch').
html().
replace('http://ift.tt/17zCwcL',
'http://ift.tt/1JNFH26')
);
}



<div class="grimm">
<div class="ch">
<img src="http://ift.tt/17zCwcL" />
</div>
</div>



Aucun commentaire:

Enregistrer un commentaire