Created
January 28, 2016 16:24
-
-
Save Juraci/d1e65c3a4878f477fba1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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