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.
1 Odpowiedź
+ 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.