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.

Revisions

  1. dahaha-365 renamed this gist Jan 20, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. dahaha-365 created this gist Jan 20, 2015.
    10 changes: 10 additions & 0 deletions hoverE-js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    $(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")
    });
    });