Skip to content

Instantly share code, notes, and snippets.

@Juraci
Created January 28, 2016 16:24
Show Gist options
  • Save Juraci/d1e65c3a4878f477fba1 to your computer and use it in GitHub Desktop.
Save Juraci/d1e65c3a4878f477fba1 to your computer and use it in GitHub Desktop.
var HIGHLIGHT = (function(){
var boxShadow = "0 0 15px rgba(81, 250, 200, 1)";
var border = "1px solid rgba(81, 250, 200, 1)";
return {
glow: function(element) {
var originalBoxShadow = element.style.boxShadow;
var originalBorder = element.style.border;
setInterval(function(){
element.style.boxShadow = boxShadow;
element.style.border = border;
setTimeout(function() {
element.style.boxShadow = originalBoxShadow;
element.style.border = originalBorder;
}, 1000);
}, 2000);
}
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment