Skip to main content
edited tags
Link
j0k
  • 22.8k
  • 28
  • 81
  • 90
edited title
Link
mamdouh alramadan
  • 8.5k
  • 6
  • 39
  • 53

chosen with bootstrap 3 nonot working properly

Source Link
mamdouh alramadan
  • 8.5k
  • 6
  • 39
  • 53

chosen with bootstrap 3 no working properly

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. Here's the code:

$('.someClick').click(function(e){ e.preventDefault(); x.modal('show'); x.find('.modal-body').load('path/page.html', function(response, status, xhr){ if(status =="success") $("select[name=elementName]").chosen(); }); }); 

the results I'm getting is like the following image:

Modal View

and this is my Html content:

 <select name="elementName" data-placeholder="Please work.." class="chosen-select"> <option value="test">Hi</option> <option value="test2">bye</option> </select>