1//change image src with jquery
2$("#myImageID").attr("src","images/my_other_image.png");
3
4//change image src plain javascript
5document.getElementById('myImageID').src="images/my_other_image.png";
6
1$(document).ready(function () {
2 $('img').click(function(){
3 $(this).attr('src','images/download.jpeg')
4 })
5})
1<img id="my_image" src="first.jpg"/>
2<script>
3//Then you can change the src of your image with jQuery like this:
4$("#my_image").attr("src","second.jpg");
5</script>
1//img is the attribute tag you can use #id if you want
2$("img").click(function () {
3 // Change src attribute of image
4 $(this).attr("src", "images/card-front.jpg");
5 });