I want to loop through all my input
elements and select
elements in one loop but this doesn't work.
$('#blockProperties :input :select').each(function () {
// do something
});
When I only loop through one of the two it does work.
The selector should be:
'#blockProperties :input, #blockProperties select'
What you have is looking for a select inside an input.
The manual says :input
"selects all input, textarea, select and button elements." So just do:
$('#blockProperties :input').each(function () {
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With