1
0
mirror of synced 2024-11-23 05:26:10 +03:00
select2/docs/_includes/examples/multiple-max.html
Kevin Brown 74387b9863 Switched examples to use Jekyll's highlighting
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.
2016-01-30 18:09:01 -05:00

25 lines
649 B
HTML

<section>
<h1 id="multiple-max">
Limiting the number of selections
</h1>
<p>
Select2 multi-value select boxes can set restrictions regarding the
maximum number of options selected. The select below is declared with
the <code>multiple</code> attribute with <code>maximumSelectionLength</code>
in the select2 options.
</p>
<div class="s2-example">
<p>
<select class="js-example-basic-multiple-limit js-states form-control" multiple="multiple"></select>
</p>
</div>
{% highlight js linenos %}
$(".js-example-basic-multiple-limit").select2({
maximumSelectionLength: 2
});
{% endhighlight %}
</section>