If you want a cleaner look, you can always just throw together a quick
plugin to handle things:
$.unwrap = function(){
return this.each(function(){
var el = $(this);
el.before( el.html() ).remove();
})
}
Then, simply call:
$('a.tester').unwrap();
And it will unwrap all matching tags.
On Aug 6, 2:10 pm, piter <[email protected]> wrote:
> Hi,
>
> Not sure if sent the post but Solution is quite easy (I wouldnt even
> use jQuery for this):
>
> For re-use purposes create function:
>
> function rmTags(ref){
> ref.parentNode.insertBefore( document.createTextNode
> (ref.innerHTML),
> ref);
> return ref.parentNode.removeChild(ref);
>
> }
>
> get reference to Your link, (however You want, jQuery etc.) and invoke
> function on it;
>
> rmTags( $("theLink") );
>
> cheers
>
> ps. not sure if previous was sent so if it's repeated just delete it.