jquery - Find each img src in document body -
i want find each image on page , replace image
i attempting following piece of jquery.
$('img').each(function() { $(this).attr("src", "http://myurl.com/mypic.jpg"); } however not updating of images on page? there have missed?
in code haven't finished function closing ). try:
$("img").each(function () { $(this).attr("src", "http://myurl.com/mypic.jpg"); }); or simplify:
$("img").attr("src", "http://myurl.com/mypic.jpg");
Comments
Post a Comment