jQuery Validate: Remove element AFTER validation BEFORE submit?
问题 I have a SVG map of a city that when clicked, creates hidden elements in a div in my form. I'm using the jQuery Validation Plugin to validate my form. In order to make sure that the user has clicked on an area of the map, I thought to create a dummy hidden element inside where the normal hidden elements are and put the validation rule on that. I wrote my own validation rule to check for the number of hidden elements (indicating that a user has clicked somewhere on the map). That rule is this: