开发者

Putting add and remove together only in the last input

开发者 https://www.devze.com 2023-03-25 13:52 出处:网络
After each time, click on add, placed add and remove together. I do not want to have add and remove placed together.开发者_运维知识库 I only want remove placed besides input (remove add). Also in the

After each time, click on add, placed add and remove together. I do not want to have add and remove placed together.开发者_运维知识库 I only want remove placed besides input (remove add). Also in the last input that adding, placed add and remove together, how is it?

See: jsFiddle - my code


I havn't re-written your code at all. I just fixed it to do what you want, see Here: http://jsfiddle.net/4BnHy/1/.

There are much better approaches to having dynamic adding/removing. Consider having a separate add button above and separate to the inputs.

You needed to do a .find() inside of the newDiv and remove it.

0

精彩评论

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