Another simple question which I think to be impossible, I am very hopeful you will once again prove me wrong!
Start off with two variables, pointing at DOM elements:
myFirstVariable = $('.my-little-radio input[type=radio]');
mySecondVariable = $('.my-little-select select');
We then need to run a check on any actions made on both of these variables, but only once and in the same function. The question is how do we ping both of the variables into a query selector all style variable to check against?
var myMultiVariable = $(myFirstVariable, mySecondVariable);
myMultiVariable.on('change', function() {
// I am not crazy!
});
As far as I can tell, the above will only work for the myFirstVariable, and not for the other selectors chained.
Specific question: How can I chain two variables set as DOM elements together to attach an event listener in order to only run the function once?