MCPcopy Create free account
hub / github.com/unconed/TermKit / addClass

Function addClass

HTML/external/syntaxhighlighter_3.0.83/src/shCore.js:396–400  ·  view source on GitHub ↗

* Adds CSS class name to the target DOM element. * @param {DOMElement} target Target DOM element. * @param {String} className New CSS class to add.

(target, className)

Source from the content-addressed store, hash-verified

394 * @param {String} className New CSS class to add.
395 */
396function addClass(target, className)
397{
398 if (!hasClass(target, className))
399 target.className += ' ' + className;
400};
401
402/**
403 * Removes CSS class name from the target DOM element.

Callers 1

quickCodeHandlerFunction · 0.85

Calls 1

hasClassFunction · 0.85

Tested by

no test coverage detected