I'm currently developing a browser game and incorporating custom cursors into it. To ensure the custom cursor is displayed throughout the entire page, I've applied it in my CSS (though setting it up for 'body' occasionally reverts back to default at certain points).
html {
cursor: url("http://www.iwansfactory.com/tycoon/defaultcursor.png"), default;
}
Now, I'm looking to alter the URL property of the above CSS through javascript.
For instance, when a user is moving across the map, I want to switch to this custom cursor:
http://www.iwansfactory.com/tycoon/movecursor.png
Is there a way to modify this value using javascript? Any guidance would be greatly appreciated! :)