#1415788: Javascript winter clean-up

Replace $element[check ? 'addClass' : 'removeClass']('classname'); with $element.toggleClass('classname', check);, same for show/hide.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

droplet’s picture

Status: Needs review » Reviewed & tested by the community

cleaner code

droplet’s picture

Issue tags: +Needs backport to D7
Dries’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 8.x. Patch will need a re-roll for 7.x so moving to 7.x with the 'to be ported' status.

Albert Volkman’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.4 KB

D7 re-roll!

nod_’s picture

Status: Needs review » Reviewed & tested by the community

Works for me, thanks :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 7.x. Thanks for all of these nice JS clean-up patches!

Automatically closed -- issue fixed for 2 weeks with no activity.