Greetings, I am in the process of designing a website for a client.
I have encountered a challenge in changing the cursor icon when a user performs a mousedown on an object.
- There is an image on the webpage
- When the user clicks on the image, the cursor should change to "grabbing"
- The user should be able to drag and drop the image position
- Upon releasing the mouse click, the cursor should revert back to "default"
I attempted to implement these steps, but I faced difficulties in changing the cursor upon mousedown event.
Is it possible for JavaScript to change the mouse cursor at that specific timing? If so, how can this be achieved?
I have come across resources discussing "Change cursor on hover event," but none addressed the same scenario as described above.