jQuery(function($){
$.fn.unwrapInner = function(tgt){
var _html = this.children(tgt).html();
this.children(tgt).remove();
this.html(_html);
return this;
});
$('#wrap').unwrapInner('.delete');
});
<div id="wrap">
<p class="delete"><img src="./dummy.jpg" alt="dummy..."></p>
</div>
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.