Jquery Chosen 插件 动态生成option 或重新绑定的解决方案

来源:互联网 发布:js捕获事件target 编辑:程序博客网 时间:2024/06/16 04:56

经常会遇到  使用jquery的chose插件后没有效果,是因为在动态拼接html后没有使用下面的语句:

 id 为secGroupOwner

         <select id="secGroupOwner" class="chzn-select" multiple style="width: 200px; height: 13px; line-height: 16px; border-style: none;"></select>

           $("#secGroupOwner").trigger("liszt:updated");

            $("#secGroupOwner").chosen();
0 0