SyntaxFix
Write A Post
Hire A Developer
Questions
This is what you wanna do:
var oldSrc = 'http://example.com/smith.gif'; var newSrc = 'http://example.com/johnson.gif'; $('img[src="' + oldSrc + '"]').attr('src', newSrc);