Link into picture - jQuery -


what easiest way change element:

<a href="pic.png"> 

into:

<img src="pic.png"> 

use replacewith

$('a').replacewith(function() {     return $('<img/>').attr('src', this.href); }); 

replace 'a' selector links need replaced.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -