jQuery extension to work easily with BEM modifiers.
This problem can be solved with jQuery.toggleModifier. Look this case:
To add a modifier (without jQuery.toggleModifier) we should evoke the
.toggleClass() of jQuery. Something like this:
But now, with jQuery.toggleModifier we can just evoke
And have the same behavior.
You can also just add or remove a modifier like that:
;// or;// or;
$ npm install jQuery.toggleModifier
$ bower install jQuery.toggleModifier
Add in your Gemfile:
source '' doend
- Allow manipulation of modifiers when the element represents two or more BEM elements.