we don't need to check if one or the other in this
.is() is as much as 3x faster then .hasClass()
.is() is faster then .hasClass()
again .is() is faster then .hasClass()
another hasClass replacement