On 9/3/07, David Duymelinck <[EMAIL PROTECTED]> wrote:
>
>
> bsuttis schreef:
> > Is it possible to strip links from a designated div with jquery? I've
> > searched for a stripping mechanism, but haven't had any luck yet.
> >
> > I realize my request is pretty strange, I realize it'd be easier to
> > not create links in the first place, but before I do that, I'm just
> > curious about jquery's abilities.
> >
> >
> >
> $('#divid a').remove();
>
> should do it
>
> --
> David Duymelinck
>
>
or, just in case you want to remove the hyperlink, but leave the text:

$('#divid a').removeAttr('href');

or, if you no longer want them to be anchor elements, but just text:

$('#divid a').each(function() {
  $(this).before('<span>' + $(this).text() + '</span>').remove();
});

- Richard

Reply via email to