?? Why u wanna use jQuery for this?
It's simple thing in JS:

assuming your rference to link will be:

var theLink;

just do this:

theLink.parentNode.insertBefore(
                                document.createTextNode
(theLink.innerHTML),
                                theLink);

theLink.parentNode.removeChild(theLink);

Simple and easy, isn't it?

If you use it often make small function:

function rmTags(ref){
    ref.parentNode.insertBefore( document.createTextNode
(ref.innerHTML), ref );
    return theLink.parentNode.removeChild(ref);
}

if You use jQuery wrappers, let's say You get your link:

rmTags($("link"));

Hope it was helpful

cheers

Pete

On Aug 6, 3:42 pm, paulswansea <sendtoswan...@hotmail.com> wrote:
> I'm trying to remove a link, but keep the content within, is there a
> simple way to do this in jquery?
>
> <div>***<a href=""><div>This is a test</div></a></div>
>
> turns into
>
> <div>***<div>This is a test</div></div>

Reply via email to