All Downloads are FREE. Search and download functionalities are using the official Maven repository.

snippets.highlight.js Maven / Gradle / Ivy

The newest version!
function ttHighlight(element, color, timeout) {
    var origOutline = element.style.outline;
    ttAddStyle(element, "outline: 5px solid " + color + " !important");
    if (timeout > 0) {
        window.setTimeout(function () {
            element.style.outline = origOutline;
        }, timeout);
    }
}

/**
 * @see https://stackoverflow.com/questions/462537/overriding-important-style
 */
function ttAddStyle(element, css) {
    element.style.cssText += css;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy