How to Change the src of an Image using jquery?

Solution: Use the jQuery attr() Method for jquery change image src

You can use the jquery attr() method to change or update on replace or on click button events of the image source (like as a the source attribute of the HTML img tag) in jQuery or JavaScript. The Bellow 3+ example will replace the image source when you just clicks on the this image also you can read my prev post for jquery find by id.

jquery find by id & jquery change image source

change image src with jquery



javascript img source

change image source plain javascript


You can simply my_movies use the jquery default function attr().


html image onclick (img onclick)

using img onclick

$(document).ready(function () {

How to Change the Image Source Using jQuery?

Set image src to another image using jquery

replace or update the src of the image, not of the div or any HTML Tags:


$('.pakainfo img').click(function() {
var loc = $(this).attr("src");
$('#image-zoom img').attr("src",loc);


tamilrockers proxy
Khatrimaza a2movies mkvcinema
ssrmovies bolly4u oKhatrimaza

jquery change picture source of image


IMP Note:Please Click on the image to replace its Images source.

Poker Card

IMP Note: here above demo jquery find by id and run your HTML Page, then you can click function jquery on the image to change its Images source.

Web Programming Tutorials Example with Demo

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about jquery change image src & change multiple images on click jquery.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment