开发者

Remove html tags after animation is run with Javascript

I have the following HTML code:

<div>   
    <span>H</span>
    <span>e</span>
    <span>l</span>
    <span>l</span>
    <span>o</span>

    <span>W</span>
    <span>o</span>
    <span>r</span>
    <span>l</span>
    <span>d</span>
</div>

I want to remove all of the <span> and </span> tags from the contents of the <div>. However, the letters within the span are each appearing after a staggered .fadeIn() animation and I only want to remove the <span> tags after the animation is complete.

The final product should be <div>Hello World</div> after the animation has revealed each character.

开发者_JAVA技巧

JQuery 1.6+ solutions are welcome.


http://jsfiddle.net/dsPJu/

here is a working example

this should do the trick... you just need to use a callback function

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜