I have a piece of code where this guy wrote thirty functions for when a group of form values change.
I want to comprise them into a single function
$('#jobs_held').change(function() {
// do something, with a little variation
});
$('#residence_years').change(function() {
// do something, with a little variation
});
$('#how_long').change(function() {
// do something, with a little variation
});
Is there anyway I could do something like…
$('#jobs_held', '#residence_years', '#how_long').change(function(){
// do something, with a little variation
});
Join them into a single string to use the
multiple-selector[docs].…or find some common identity like a class to select them all.