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? -

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

ajax - PHP/JSON Login script (Twitter style) not setting sessions -