I am using this HTML on my site:
<a href="#1" id="slick-toggle"><img src="img1.jpg"/></a>
When I click this link, I would like to change the image src to img2.jpg. And revert back to img1.jpg when clicked again & so on. Can someone explain how I do this using jQuery?
Here is my existing jQuery if this helps:
$(document).ready(function() {
$('#slick-toggle').click(function() {
$('#slickbox').toggle(400);
return false;
});
});
Many thanks for any pointers with this :-)