This library defines editor methods for handling HTML class attribute. Class names of HTML objects can easily be get, set, and toggled.

The demo shows how you can define class toggling button in a simple way.

Library files:

  1. bue.class.js

Button code:

jsE.toggleClass('error''div');

API:

//Toggle a class name
E.toggleClass(CLASS, TAG);
//Add a class name
E.classSelection(CLASS, TAG);
//Remove a class name
E.classSelection(CLASS, null);
//Get class names of the selection as an array
BUE.listClass(E.getSelection());
Under supervision of Drupal :)