[jQuery] change image with jquery How to change the image with the attr function. It doesn't matter if you change the id value or the class name. $("#imgID).attr("src","/data/img2.png"); Just remember that phrase. jQuery 2022.07.22