74387b9863
This fixes some bugs that were present in the old Prettify highlighter when there was a mix of JavaScript and HTML in the same code block. Now with Rouge, the highlighter used by Jekyll, these cases are properly handled and HTML no longer looks strange. This does not convert all of the code blocks over, because there are still some code blocks which double as the actual JavaScript code powering the example that need to be migrated.
23 lines
571 B
HTML
23 lines
571 B
HTML
<section>
|
|
|
|
<h1 id="hide-search">Hiding the search box</h1>
|
|
|
|
<p>
|
|
Select2 allows you to hide the search box depending on the number of
|
|
options which are displayed. In this example, we use the value
|
|
<code>Infinity</code> to tell Select2 to never display the search box.
|
|
</p>
|
|
|
|
<div class="s2-example">
|
|
<p>
|
|
<select class="js-example-basic-hide-search js-states form-control"></select>
|
|
</p>
|
|
</div>
|
|
|
|
{% highlight js linenos %}
|
|
$(".js-example-basic-hide-search").select2({
|
|
minimumResultsForSearch: Infinity
|
|
});
|
|
{% endhighlight %}
|
|
</section>
|