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
garyilmAsked:
Who is Participating?
 
leakim971Connect With a Mentor PluritechnicianCommented:
new one : http://jsfiddle.net/LP4zn/

$(document).ready(function() {

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

})¿

Open in new window

0
 
leakim971PluritechnicianCommented:
$(document).ready(function() {

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

})

Open in new window

0
 
garyilmAuthor Commented:
that didn't work
0
 
garyilmAuthor Commented:
Perfect thanks. Can this be made into a link?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.