TinyMCE:API/tinymce.dom.DOMUtils/removeClass

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: removeClass

Summary

Removes a class from the specified element or elements.

Syntax

<String/Array> removeClass(<String/Element/Array> Element, <String> c)

Parameters

Element
ID string or DOM element or array with elements or IDs.
c
Class name to remove to each element.

Returns

String with new class value or array with new class values for all elements.

Examples

// Removes a class from all paragraphs in the active editor
tinyMCE.activeEditor.dom.removeClass(tinyMCE.activeEditor.dom.select('p'), 'myclass');

// Removes a class from a specific element in the current page
tinyMCE.DOM.removeClass('mydiv', 'myclass');
Personal tools