jquery - Avoid select options being automatically sorted by value -
i have select element fill jquery this:
$.each(mydictionary, function (key, value) { $("#ddldepartments").append('<option value=' + key + '>' + value + '</option>'); alert(key+' '+value);//the sequence of records correct. }); alert(key+' '+value);automatically ordered values.
the items added in correct order. confirm alerting added item value , inner html @ each record. then, after items added, select element gets automatically sorted values in ascending order. there way can avoid behavior?
Comments
Post a Comment