I would like to select multiple buttons and click the first in order. Something like COALESCE function.
I tried this:
$(".selector1, .selector2, .selector3").first().click();
This works but the selection follows the DOM order and not my selector query order. Any suggestion?
jQuery always returns elements in DOM order, so you’ll need to do something along these lines:
You could poor that into a jQuery extension like so:
And then call