I\'m trying to take the contents of a list, that is not in alphabetical order, then by adding each item to an array, sort them into alphabetical order and insert them back i
You can simply do:
$("li").each(function(i) { $(this).text(sectors[i]) });
After you sorted the sectors array. Note your id's need to be unique.
sectors