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
I had the same problem today but I needed a quickly solution... but firs a screenshot of my problem:
This is my problem
so I did this:
1) The problem is the "width", so I saw on console this
take a look on the console, over the "select"
2) I made a quickly solution adding a new "width". As you can see in the previous image, there is a class 'class="chosen-container chosen-container-single', so I took the class "chosen-container" to add the new "width" when I call my "Modal". Here my code:
just add one line
so, basically I added this code:
$('.chosen-container').css({ 'width':'350px' });
to the function that call the modal. Feel free to copy and paste this on your function :) Maybe it is not a perfect solution but it works for me and maybe for you too.
sorry for my english, but I'm learnig. I speak spanish better than english. Greetings
PD: There is my result