I would like to remove certain characters in my img tag that is a list item in a loop.
I would like to get rid of: " li="" ..." but keep my image src intact. Any help would be awesome!!
This is my output:
<li>
<img li="" ...<="" src="myimage.jpg?932">
<li>
This is what Ive tried but no luck…
$("#blogs li").each(function(i) {
$(this).children('img').find('...<="" li="">').remove().end().html();
});
You should fix your loop code, instead of using JavaScript. Try using.
replaceWithmethod.