ce2204cff0
This is just code samples, most of this still needs readable (non-code) documentation that actually explains what is going on with the options.
29 lines
502 B
HTML
29 lines
502 B
HTML
<section>
|
|
<h2>
|
|
Can I change how selecting results works?
|
|
</h2>
|
|
|
|
<h3>
|
|
Can I select the highlighted result when the dropdown is closed?
|
|
</h3>
|
|
|
|
<pre class="prettyprint">
|
|
$('select').select2({
|
|
selectOnClose: true
|
|
});
|
|
</pre>
|
|
|
|
{% include options/not-written.html %}
|
|
|
|
<h3>
|
|
Can I prevent the dropdown from closing when a result is selected?
|
|
</h3>
|
|
|
|
<pre class="prettyprint">
|
|
$('select').select2({
|
|
closeOnSelect: false
|
|
});
|
|
</pre>
|
|
|
|
{% include options/not-written.html %}
|
|
</section> |