Add alternative to jQuery toggleClass.