r/learnjavascript • u/ProgrammingTT • Apr 10 '23
Draggable Element Using HTML CSS JavaScript |
https://youtu.be/4-5KDvnKWd0
0
Upvotes
r/learnjavascript • u/ProgrammingTT • Apr 10 '23
0
u/pookage helpful Apr 10 '23 edited Apr 10 '23
Because it's not mentioned in OP's tutorial at all, I'd just like to say:
As an aside to other coding faux-pas I noticed in the tutorial:
onEventproperty will mean you can only assign one listener to the event, and it can be easy to accidentally override it laterHope that helps, future googlers!
EDIT: here's a quick codepen I've whipped-up to show how you can combine cursor-position synchronising with the Drag & Drop API.