Forum Discussion
KurtMasteller
12 years agoCommunity Member
Change mouse cursor on rollover or use a custom image for cursor
Is it possible to use a custom mouse cursor for an interaction, or change the mouse cursor to an image instead of the pointing hand?
I have been asked to do this and I can't figure out a way to m...
OrestMykyta-e8a
Community Member
To change the cursor on all hyperlinks within text, use the following JavaScript:
var styleElem = document.createElement("style");
styleElem.innerHTML = '.link-hit-area {cursor: crosshair}';
document.head.appendChild(styleElem);
To change the cursor on all buttons and hotspots, use the following JavaScript:
var styleElem = document.createElement("style");
styleElem.innerHTML = '.cursor-hover:hover {cursor: crosshair}';
styleElem.innerHTML = '.cursor-hover:hover * {cursor: crosshair}';
document.head.appendChild(styleElem);
The above change the cursor to the Crosshair style. Replace "crosshair" to whichever you like from the list in my post above.
NaveeraAshraf
5 years agoCommunity Member
Awesome! it works beautifully. Thank you so much for the help.