0

Swaping elements in js(drag and drop)

Can somebody help to understand swapping elements? I know basics of dragging and dropping but can't do swapping.

9th Oct 2020, 10:18 AM
Otabek Karimov
Otabek Karimov - avatar
1 Respuesta
+ 5
https://code.sololearn.com/Whq9rPnTy5BK/?ref=app In this old code of mine I have used a swap function. function swap() { var a = document.getElementById('first').value; document.getElementById('first').value = document.getElementById('second ').value; document.getElementById('second').value = a; } I hope I have been helpful.
9th Oct 2020, 10:42 AM
Gabriele Gatti
Gabriele Gatti - avatar