Typo - remove '.' prefix from hasClass call.