While dragging an element over the browser client area in HTML5, how can I change the cursor to any cursor that I want?
So far, I've only been able to display the default cursor while dragging (except for the none cursor wherever dropping is not supported).
I'm not talking about any of the following:
using
event.dataTransfer.setDragImage()
to display an image besides the cursorusing
event.dataTransfer.dropEffect
to display a copy or a link symbol besides the cursor, or to change the cursor to the none symbolin Firefox, using
event.dataTransfer.mozCursor
, since that can only perform the default system behavior, or display the arrow cursor, neither of which helps (besides, I want cross browser support, though I'm primarily targeting Chrome)
I've tried many other tricks, including using CSS :hover
and :focus
, and many JavaSscript tricks, all to no avail.
Thanks for any help.
document.querySelector('.droppable').style.cursor = 'whatever'
– Rochellrochella