2015-09-13 11:31:59 -04:00
|
|
|
<section>
|
|
|
|
<h2>
|
|
|
|
Can I change how the dropdown is placed?
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<h3 id="dropdown-attachContainer">
|
|
|
|
Can the dropdown be placed directly after the selection container?
|
|
|
|
</h3>
|
|
|
|
|
2015-09-14 19:30:32 -04:00
|
|
|
{% include options/not-written.html %}
|
2015-09-13 11:31:59 -04:00
|
|
|
|
|
|
|
<h3 id="dropdownParent">
|
|
|
|
Can I pick an element for the dropdown to be appended to?
|
|
|
|
</h3>
|
|
|
|
|
2016-02-14 13:33:33 -05:00
|
|
|
{% highlight js linenos %}
|
2016-01-14 19:29:48 -05:00
|
|
|
$('select').select2({
|
|
|
|
dropdownParent: $('#my_amazing_modal')
|
|
|
|
});
|
2016-02-14 13:33:33 -05:00
|
|
|
{% endhighlight %}
|
2016-01-14 19:29:48 -05:00
|
|
|
|
2015-09-14 19:30:32 -04:00
|
|
|
{% include options/not-written.html %}
|
2015-09-13 11:31:59 -04:00
|
|
|
|
|
|
|
<h3>
|
|
|
|
I'm using a Bootstrap modal and I can't use the search box
|
|
|
|
</h3>
|
|
|
|
|
2016-05-26 20:52:37 -04:00
|
|
|
<p>
|
|
|
|
Use the <code>dropdownParent</code> option, setting it to the modal.
|
|
|
|
</p>
|
|
|
|
|
2015-09-14 19:30:32 -04:00
|
|
|
{% include options/not-written.html %}
|
2015-09-13 11:31:59 -04:00
|
|
|
|
|
|
|
<h3>
|
|
|
|
I'm using jQuery UI and I can't use the search box
|
|
|
|
</h3>
|
|
|
|
|
2015-09-14 19:30:32 -04:00
|
|
|
{% include options/not-written.html %}
|
2015-09-13 11:31:59 -04:00
|
|
|
</section>
|