- Create variables for the filled and empty elements
- Add event listeners for the filled elements ('dragstart', 'dragend')
- Create a function dragStart() which sets the 'hold' class and hide the original element with 'invisible' class
- Create a function dragEnd() that sets the class back to 'fill'
- Loop through the empties and call drag events (drag events: 'dragend', 'dragover', 'dragenter', 'dragleave', 'drop')
- Create functions for each drag events and add the classnames to each function where needed
balazsletai / js_ws_beginner_homework_drag_n_drop Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rolandpakai/js_ws_beginner_homework_drag_n_drop