Is it feasible to customize the cursor during a drag operation?
I've been exploring ways to achieve this for some time now. My goal is to replace the default 'not-allowed' cursor that appears when dragging an object with a different cursor.
One approach I attempted was creating an event and associating it with the image I intended to drag:
<img id="drag1" class="drag" src="http://www.example.com/image.png" draggable="true" ondragstart="drag(event)" />
Here is the JavaScript code snippet I used:
function drag(ev) {
$('#drag1').css('cursor', 'grabbing');
}
Note: My current project involves HTML5 drag and drop functionality, thus it is essential for me to be able to modify the cursor while dragging a div with the HTML5 'drag' attribute.