This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"number of persons" form field has dynamic created IDs. The field QTY input type="number" | |
I've added buttons and some jquery, however, because I have multiple "person_types" fields, the plus / minus onclick is affecting all the fields | |
How to target the individual fields using something like a foreach - but within the jquery? | |
current code in functions file | |
// get IDs from dynamic person_type field | |
$("input[id^='wc_bookings_field_persons_']").each(function() { | |
var id = parseInt(this.id.replace("wc_bookings_field_persons_", ""), 10); |