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.
精彩评论