This solution is easier one if the parent element has only one element
- the span, if the parent element hase more spans (or other elements)
parent.html() would overwrite all elements and replace them with the
content of the child.

The performace might also be an issue, however I have no idea which
one is faster: html() od insertBefore().

by(e)
Stephan


2009/1/24 Mike Alsup <mal...@gmail.com>:
>
>> I'm writing an effect, which has to build a span around my element,
>> but when my effect is finished I wanted to strip this span tag, in
>> order to leave the situation as it was before..
>>
>> How can I strip a tag??
>> Is there something like: $(this).parent().strip(); ???
>
> In your example is 'this' the span?  If so, I'd try something like
> this:
>
> $(this).parent().html( $(this).html() );

Reply via email to