var list = document.getElementById('test-list');
for (var i = 0; i < list.children.length - 1; i++ ) {
for (var j = i + 1; j < list.children.length; j++ ) {
if (list.children[i].innerText > list.children[j].innerText) {
list.insertBefore(list.children[j], list.children[i]);
}
}
}
L0standfound
var list = document.getElementById('test-list'); for (var i = 0; i < list.children.length - 1; i++ ) { for (var j = i + 1; j < list.children.length; j++ ) { if (list.children[i].innerText > list.children[j].innerText) { list.insertBefore(list.children[j], list.children[i]); } } }