add hasClass support

Fixes #7