$("#my_image").attr("src","second.jpg");
$(document).ready(function () {
$('img').click(function(){
$(this).attr('src','images/download.jpeg')
})
})
//Change the img property using jQuery's attr method
$("#myImage").attr("src", 'img/new-image.jpg');
<img id="my_image" src="first.jpg"/>
<script>
//Then you can change the src of your image with jQuery like this:
$("#my_image").attr("src","second.jpg");
</script>
$("#my_image").attr("src","second.jpg");
//img is the attribute tag you can use #id if you want
$("img").click(function () {
// Change src attribute of image
$(this).attr("src", "images/card-front.jpg");
});
$('img').attr(src);