Dynamically Adding/Remove Rows with Field Validation
I'm trying to dynamically add and remove phone number fields, while providing validation/masking on them at the same time. I have two examples that each do part of this, but I'm struggling to get them to work together. To start:
- This example works for the phone validation. The problem is the remove button only removes the most-recent row added. I need to have a remove button next to each input field and be able to remove each one independently.
- This doesn't have the masking/validation, but it does the add/remove just as needed. The issue is my first example is using .append to create much of what's going on (and adding the .mask to each input field), where the second example is using .clone.
I'd like to integrate the masking into the second example, but have been struggling to do so.
Any help would be greatly appreciated.
Okay, I've gotten it nearly-working, except in IE.
The above example works in FF and Chrome, but in IE, the fifth input field doesn't allow for input of a number - instead replacing the first input field. I'm have a little trouble figuring out what's going on here.
Any ideas? Thanks in advance all.
|All times are GMT +1. The time now is 04:11 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.