I am trying to replace an img path in jquery (injecting into a remote page)
replace example.com/thumbs
with ex
var oldSrc = 'http://example.com/smith.gif'; var newSrc = 'http://example.com/johnson.gif'; $('img[src="' + oldSrc + '"]').attr('src', newSrc);
This is what you wanna do: