Dragging and Dropping Cards

Shift cards around by dragging and dropping.

Exercise:

Make it possible to drag and drop cards.

Source code: Use the PomodoroTracker6 folder as a starting point. The result is in PomodoroTracker7.

Solution: There is a draggable attribute in HTML5. When using this attribute, you will be able to automatically move draggable elements by holding down the mouse button. Let’s make our selected card draggable:

Get hands-on with 1400+ tech skills courses.