Home Office
Home Office

Reputation: 21

Javascript custom cursor

I try to figure out how to make simple Javascript custom cursor. I find couple Advanced lvl scripts, but that's not what i looking for. I will love to understand most simple way to do it in pure Javascript. I read couple of discussions here and other forums but nothing is working for me.

element.style.cursor = "url('http://bringerp.free.fr/Files/RotMG/cursor.gif'), auto";

Upvotes: 2

Views: 290

Answers (1)

tom
tom

Reputation: 10601

What you are trying is working if you load the external image within a page with the same protocol (http).

Save the image in your web app and load it from your own domain.

I found this page http://www.webpage-maker.com/

open the console and put this in:

document.querySelector('#container').style.cursor = "url('http://bringerp.free.fr/Files/RotMG/cursor.gif'), auto";

Upvotes: 3

Related Questions