Avoid unnecessary indexOf from toggleClass