Add a $.fn.bindClass function for mapping an attribute to a class.

Review Request #4274 — Created June 30, 2013 and submitted

Information

Review Board
master

Reviewers

Add a $.fn.bindClass function for mapping an attribute to a class.

bindClass is used when you want to toggle whether a class is on an
element based on the value of a boolean attribute. It adds or removes
the class initially based on the attribute at the time of binding, and
responds to all updates to the property.

Like the other binding functions, it also supports an 'inverse' option
for flipping when the class will be present.
Unit tests pass.

Tested with my upcoming diff viewer whitespace toggles change.
Description From Last Updated

Shouldn't "this" already be a jquery here?

daviddavid

just a pointing declaration, $ not required

SA santhosh.m
david
  1. 
      
  2. Show all issues
    Shouldn't "this" already be a jquery here?
  3. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
SA
  1. 
      
  2. Show all issues
    just a pointing declaration, $ not required
  3.