jQuery Opacity by Mouse Location

    jQuery Opacity by Mouse Location

    Change an element’s opacity based on the mouse’s distance from its center.

    The idea is to use some jQuery to define an invisible circle around the center point of an element, and to lower the element’s opacity as the user’s mouse gets closer to its center. The effect works best with an image that is close to square, but it will define the circle within any sized image.

    Leave a Reply