Ep101 - Reorderable Listitem with Javascript Tutorial & Source Code

Опубликовано: 02 Июнь 2024
на канале: UI Monk
58
like

Ep101 - Reorderable Listitem with Javascript Tutorial & Source Code
https://drive.google.com/file/d/1w-bs...

Ep101 - Draggable list with Javascript
1. add dragstart event on all listitem
2. once drag is started add class "dragging"
3. once drag is over remove the added dragging class
4. get all li expect the selected li with class dragging
5. use the spread operator to convert nodelist to array
6. use find function of array to return if the condition is true
7. use the insertbefore to place the selected li

100+Javascript Playlist
   • Ep101  - Reorderable Listitem with Ja...