changed logic for hasClass function

It obviously wouldn't happen here, but using `indexOf` can sometimes lead to weird results.. like if you were checking for a class of `'hi'` inside of `'hi-diddly-ho'`.

D: