Calculate Distance between Mouse and Element Using Jquery

You can calculate Distance between Mouse and elment using Jquery.
Add Below Script and put element ID.
Note : Dont forget to include jquery latest library.

This code will calculate the distance between the mouse cursor and the center of an element. This can be useful for triggering a function when the mouse is within a certain distance of an element. Or, you can base the value of a property, such as the width, height, or opacity of the element, on the proximity of the mouse cursor.

Please share and Comment if you want any help.