MCPcopy
hub / github.com/MagicMirrorOrg/MagicMirror / removeAnimateCSS

Function removeAnimateCSS

js/animateCSS.js:148–158  ·  view source on GitHub ↗

* Remove an animation with Animate CSS * @param {string} [element] div element to animate. * @param {string} [animation] animation name.

(element, animation)

Source from the content-addressed store, hash-verified

146 * @param {string} [animation] animation name.
147 */
148function removeAnimateCSS (element, animation) {
149 const animationName = `animate__${animation}`;
150 const node = document.getElementById(element);
151 if (!node) {
152 // don't execute animate: we don't find div
153 Log.warn("node not found for removing", element);
154 return;
155 }
156 node.classList.remove("animate__animated", animationName);
157 node.style.removeProperty("--animate-duration");
158}
159if (typeof window === "undefined") module.exports = { AnimateCSSIn, AnimateCSSOut, addAnimateCSS, removeAnimateCSS };

Callers 2

_hideModuleFunction · 0.85
_showModuleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected