Link to home
Start Free TrialLog in
Avatar of garyilm
garyilm

asked on

Jquery append image source after image

I am looking to add the image source after the image. I need to do this for every image in a div.

Example
<img src="something.jpg" />

Would become
<img src="something.jpg" />somgething.jpg
Avatar of leakim971
leakim971
Flag of Guadeloupe image

$(document).ready(function() {

$("img").each(function() { $(this).attr("src").insertAfter(this); });

})

Open in new window

Avatar of garyilm
garyilm

ASKER

that didn't work
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of garyilm

ASKER

Perfect thanks. Can this be made into a link?