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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -