I am using the code to change the image src with jquery:
<script>
$(document).ready(function() {
$('#MyDiv').click(function() {
$('#MyImageID').attr('src', 'image1.jpg');
});
});
</script>
My problem is that although it’s actually changed the src it’s not actually showing the new image.
Does it have to refresh the image ?
How can I sort this?
Pass some random number to the image:-