开发者

How can i use appendTo and insertBefore properly

开发者 https://www.devze.com 2023-02-03 05:46 出处:网络
With the append button i add elements to the same class. I want the append button and delete button beneath the appended elements,

With the append button i add elements to the same class. I want the append button and delete button beneath the appended elements, but when i use insertBefore, the Toggle function only toggles the buttons visibility.

You can check out what i mean here;

click add a box and start appending

http://www.jsfiddle.net/myd3k/

replace appendTo with inserBefo开发者_运维知识库re and toggle the visibility.

Thanks in advance


You can use prependTo

http://www.jsfiddle.net/myd3k/1/

0

精彩评论

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