g(..).removeClass(classNames)

Removes a CSS class (or classes) from each element in the Gimme Object's internal array.

Returns: Itself (the same Gimme Object is return so additional methods can be chained together seamlessly).
Params:
  • classNames, required: A space delimited list of CSS classes to be removed from all elements in the Gimme Object's internal array.

Examples:
// Removes the classes "animal" and "cat" from all <div> elements (Gimme has no problem if one or more classes is not currently applied)
g('div').removeClass('animal cat');

// Removes the class "low-resolution" from the element whose id is #main
g('#main').removeClass('low-resolution');

// Removes  the classes "foo" and "bar" from all <p> elements that are general siblings of <div> elements with the class "super"
g('div.super ~ p').removeClass('foo bar');

Last edited Jun 12, 2007 at 8:57 PM by sstchur, version 1

Comments

No comments yet.