chosen with bootstrap 3 not working properly

后端 未结 6 722
醉话见心
醉话见心 2020-12-08 04:19

I have this code which triggers a bootstrap modal and load its content via $.load(). the page I\'m loading has a select element which I\'m calling chosen on. He

6条回答
  •  借酒劲吻你
    2020-12-08 05:14

    As described in Allow Chosen to be used in Bootstrap modal, the problem is within the chosen.jquery.js file. I found it on line 435 and just added the following code inside the else statement. check it out, it worked for me.

    // Fixing problem when the select is not displayed.
       if ( this.form_field.offsetWidth == 0 ) {
          return "" + $(this.form_field).width() + "px";
        }
    

提交回复
热议问题