I have following code:
var elem1 = $("#elem1");
var elem2 = $("#elem2");
var elem3 = $("#elem3");
I want to disable all these in single line of jquery code using the var names. I know jquery allows to find the multiple elements using single $("#elem1, #elem2")
but I want to use the variable name and disable them at once, something like:
elem1.elem2.elem3.prop("disabled", true);
Is it possible? How to do this?