For what it's worth, there is a performance improvement with .hasClass()
in my limited testing: http://jsperf.com/jquery-hasclass-vs-addclass-and-removeclass
However, even when standalone .removeClass()
reports several times slower in Chrome, it comes in at approximately 70,000 operations a second.