1
0
mirror of synced 2024-11-24 05:46:09 +03:00
select2/docs/_includes/examples/multiple-max.html
Stretch d91dfecd98 #3326 Maximum selection example
Fixing the documentation for maximumselectionlength
2015-06-10 18:59:09 +10:00

29 lines
738 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>
<pre data-fill-from=".js-code-multiple-limit"></pre>
<script type="text/x-example-code" class="js-code-multiple-limit">
$(".js-example-basic-multiple-limit").select2({
maximumSelectionLength: 2
});
</script>
</section>