fix ReferenceError: Can't find variable: hasClass