Pricing Blog

Div Follow Mouse, lose position.

  • uunicode-1376168211665653840

    unicodes

    2 months ago

    I want to prevent losing the position of the mouse, and as you can see in the video, it resets to the default during mouse movement instead of keeping the correct values.

    I created a mousemove event on the parent div to store the X and Y coordinates in variables.
    The zoom div uses these X and Y values to set its left and top positions.

    What would you recommend to ensure smooth movement of the zoom div?
    1376168212194005042-Screenshot_2025-05-25_at_14.57.40.png
  • uunicode-1376173679032930314

    unicodes

    2 months ago

    The issues was solved, I do not know why but now performance changed, and is smooth. In case you you have some recommendations for a better performance, please let me know.