1. jQuery Chosen Select box drop-down value reset;
Reset $ ("#easySelBrands"). Val ("Default value"). Trigger ("chosen:updated");
The assignment defaults to be updated with trigger ("chosen:updated"), otherwise invalid;
2. Problems with multiple Select
Find this method in Chosen.jquery.js:
1 Chosen.prototype.activate_field2=function()3 {4 This. Container.addclass ("Chzn-container-active");5 This. Active_field6=true; 7 This. Search_field.val ( This. Search_field.val ());8 return This. Search_field.focus ();9};
Change this method to:
1Chosen.prototype.activate_field =function() {2 This. Container.addclass ("Chosen-container-active");3 This. Active_field =true;4 This. Search_field.val ( This. Search_field.val ());5 varZIndex = 1010;6 This. Container.css (' Z-index ', ' 1010 ')7$ ('. Chosen-container '). Not ( This. Container). css (' Z-index ',--zindex);8 return This. Search_field.focus ();9};
Reference links
Https://github.com/amazeui/chosen/blob/master/docs/options.md
http://blog.csdn.net/iamduoluo/article/details/11519909
JQuery Chosen Use