UNPKG

grunt-cache-killer

Version:

Kill your asset cache file problems by updating their filenames and any references to them.

30 lines (25 loc) 870 B
// Test Javascript. 'use strict'; window.addEventListener('load', function () { // Set the variables. var $heading = document.getElementById('heading'); var $class = 'highlight'; // Mouseover. $heading.addEventListener('mouseover', function () { // Add class to the element. if ($heading.classList) { $heading.classList.add($class); } else { $heading.className += ' ' + $class; } }); // AMouseout. $heading.addEventListener('mouseout', function () { // Remove class from the element. if ($heading.classList) { $heading.classList.remove($class); } else { $heading.className = $heading.className.replace(new RegExp('(^|\\b)' + $class.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); } }); });