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

Function hasClass

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

* Checks if target DOM elements has specified CSS class. * @param {DOMElement} target Target DOM element to check. * @param {String} className Name of the CSS class to check for. * @return {Boolean} Returns true if class name is present, false otherwise.

(target, className)

Source from the content-addressed store, hash-verified

384 * @return {Boolean} Returns true if class name is present, false otherwise.
385 */
386function hasClass(target, className)
387{
388 return target.className.indexOf(className) != -1;
389};
390
391/**
392 * Adds CSS class name to the target DOM element.

Callers 1

addClassFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected