I am trying to replace an img path in jquery (injecting into a remote page)
replace example.com/thumbs
with ex
Look at this one, you wasn't setting src for an image.
$(function() { $('img').each(function() { $(this).attr('src', $(this).attr('src').replace('thumbs', 'imagessss')); console.log('New src: ' + $(this).attr('src')); }); });