I have a form with a bunch of inputs, including cities. Other inputs either need to be shown or hidden depending on the cities the user has selected.
I have two arrays:
var biking_cities = ['newyork',];
var cars_cities = ['newyork','newjersey','metronorth','longisland','boston','chicago','sanfrancisco','london','paris','washington',];
So if any of the cities = newyork, then the biking input needs to be hidden. Same for "cars".
The city inputs all look like this:
<input class="city" type="hidden" name="city1" value="foo">
<input class="city" type="hidden" name="city2" value="foo">
And so on (max 9 cities).
What's an efficient way to create an array and check it against other arrays and then do something in case they match?
Thanks, Brian
type='hidden'
?