I am trying to use jquery to switch between three images as soon as you click on the image. After clicking on the third image, it switches back to the first image.
Is there a way to adapt the following to switch between more than two images, and to allow it more than switch once?
JQuery
$(document).ready(function() { $("#clickMe").click(function() { $("#myimage").attr({src : "picture2.png"}); }); });
HTML
<div id="clickMe"><img id="myimage" src="picture1.png" /></div>
Thanks.
user137000
source share