I have the following jQuery selector:
$("a[href^='http://'],a[href^='https://']");
Is it possible to change this so that I don’t need to specify a[href^= twice?
For example, something like:
$("a[href^='http://'||'https://']");
EDIT: My example of http and https should not be taken literally. I could be looking for values starting with y and z instead.
Quite simple if you’re willing to use a second function call:
Or with tokens:
Or with a custom expression:
Which would be used as: