Posted inOpen Source Technology
Easiest way to sort a select element using Jquery
If you are using jquery sorting a select element is quite easy. Check the below code. $("#select-id").html( $("#select-id option").sort(function (a, b) { return a.text == b.text ? 0 : a.text…