Add a $.fn.bindClass function for mapping an attribute to a class.
Review Request #4274 — Created June 30, 2013 and submitted
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? |
david | |
just a pointing declaration, $ not required |
SA santhosh.m |