How to change Cursor image on another image hover using Javascript or jQuery

Viewed 35

I am working on a task where I hover on an image, I should get a custom cursor(150x150). I do workarounds, but am unable to get a smooth hover. Please help me with this.

[https://codepen.io/LeelaMathaiyan/pen/yLjgWjK][1]

Sample screenshot on hovering an image using image cursor:-

enter image description here

1 Answers

You can do it without js, just:

.class {
    cursor: url('components/assets/decorations/Pointer.png'), auto;
  }

in you css.

Of course, if you need to do it dynamically, you can use the tag style.

Related