1
0
mirror of synced 2024-11-25 22:36:03 +03:00
select2/docs/_includes/examples/multiple-max.html

25 lines
649 B
HTML
Raw Normal View History

2015-05-06 02:19:05 +03:00
<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>
2015-05-06 02:19:05 +03:00
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 %}
2015-05-06 02:19:05 +03:00
$(".js-example-basic-multiple-limit").select2({
maximumSelectionLength: 2
});
{% endhighlight %}
2015-05-06 02:19:05 +03:00
</section>