设置jquery选择的选项未排序

时间:2017-06-20 20:54:41

标签: javascript jquery angularjs angular-chosen

当值为整数时,是否有人知道是否有办法将所选择的选项设置为未排序?

我目前已选择使用以下JSON选择一周的日期

[{"VAL":1,"DES":"Sunday","$$hashKey":"object:611"},
{"VAL":2,"DES":"Monday","$$hashKey":"object:612"},
{"VAL":3,"DES":"Tuesday","$$hashKey":"object:613"},
{"VAL":4,"DES":"Wednesday","$$hashKey":"object:614"},
{"VAL":5,"DES":"Thursday","$$hashKey":"object:615"},
{"VAL":6,"DES":"Friday","$$hashKey":"object:616"},
{"VAL":7,"DES":"Saturday","$$hashKey":"object:617"}]

而且,当我选择星期三,然后星期日,我希望列出星期三,星期日([4,1])而不是排序方式,星期日,星期三([1,4])

您可以在this fiddle中看到问题。只是尝试选择第一个星期三然后星期一,看看它是如何排序的

为了更好的背景,我使用adityasharat angular chosen directive使用jQuery chosen plugin

由于

编辑:只是为了它,我tested the chosen plugin alone,并且它设置未排序的值,因为我希望它们被列出。但我不能使用纯粹的jquery,因为我试图坚持使用棱角分明

0 个答案:

没有答案