jQuery Chosen 使用

來源:互聯網
上載者:User

標籤:.net   否則   arch   doc   http   this   add   問題   upd   

 

1.  jQuery Chosen 選擇框下拉值重設;

 //重設$("#easySelBrands").val("預設值").trigger("chosen:updated");        

  賦值為預設值後要用trigger("chosen:updated")更新,否則無效;

 

 

2. 多個select在一起的問題

在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 };

將此方法改為:

1  Chosen.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       var zindex = 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     };

 

 

參考連結

https://github.com/amazeui/chosen/blob/master/docs/options.md

http://blog.csdn.net/iamduoluo/article/details/11519909

jQuery Chosen 使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.