Skip to content

Instantly share code, notes, and snippets.

@dahaha-365
Last active August 29, 2015 14:13
Show Gist options
  • Save dahaha-365/ce527c22bf11005d09da to your computer and use it in GitHub Desktop.
Save dahaha-365/ce527c22bf11005d09da to your computer and use it in GitHub Desktop.
hover follow glow
$(document).ready(function() {
$(".hoverE-js").mousemove(function(a) {
var b = $(this);
b.hasClass("selected") || (a = "radial-gradient(" + (a.pageX - b.offset().left) + "px 100% , rgba(255,255,255,.85), rgba(255, 255, 255, 0))", $(this).css({
"background-image": "-webkit-" + a
}))
}).on("click mouseleave", function() {
$(this).removeAttr("style")
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment