Use comma to combine multiple selectors in jQuery. E.g. when listening for the change
event on form fields:
js
var form = $('#my-form');
form.on('change', 'input, select', function() {
// do something
});
1 October 2014
Use comma to combine multiple selectors in jQuery. E.g. when listening for the change
event on form fields:
var form = $('#my-form');
form.on('change', 'input, select', function() {
// do something
});