Just trying to figure out how you can test multiple selectors within an existing piece of code i.e. like this
if (!(jQuery('#selector1 || #selector2').hasClass('some-class'))) {
//code here
}
This doesn’t work but wondering if there is anything I can do to make it work ?
Just select them both, if either of them has the class
some-class, the condition is true:Or, if I misinterpreted your logic, you can (and should, for sake of speed and simplicity) break those into two: