Here is a quick little way to sort a dropdown list in jQuery. I got the answer from this StackOverflow question.
$("#id").html($("#id option").sort(function (a, b) { return a.text == b.text ? 0 : a.text < b.text ? -1 : 1 }))
Here is a quick little way to sort a dropdown list in jQuery. I got the answer from this StackOverflow question.
$("#id").html($("#id option").sort(function (a, b) { return a.text == b.text ? 0 : a.text < b.text ? -1 : 1 }))