Nathan Riley
asked on
Remove Dynamic Input Box
http://jsfiddle.net/ChrisStanyon/8ZYuF/
How can I add some text to the right of the box that says "remove" and on click removes the added box?
How can I add some text to the right of the box that says "remove" and on click removes the added box?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@ramyajanarthanan - your code will create duplicate IDs on the table and the remove button (the remove function on the button won't work). You don't need IDs on the inputs. You're also using an old version of jQuery. In the current version, the live() function is deprecated. $i++ is not needed (it's destroyed each time the function is run)
Copy paste the code and try it out.
Open in new window
Or Look at this this fiddle similar add and remove without using live
http://jsfiddle.net/eqVWz/