I am sorting li through an array. I have figured out a working way with innerHTML, but I dont want to use innerHTML, how can I fix this without innerhtml? It works fine by now, I just want to use something else instead of .innerHTML. jQuery solution would be ideal!
ul = document.getElementById("myUL");
var lis = ul.getElementsByTagName("LI");
a.sort();//array that needs to be sorted
for(var i = 0, l = lis.length; i < l; i++)
{
lis[i].innerHTML = a[i][0]+" "+a[i][1];
}
I want to change the lis[i].innerHTML
to something else in jQuery.