cleanup example and move examle based on PR comments.
This commit is contained in:
parent
7515fa7f46
commit
160abdc54e
@ -67,35 +67,6 @@ $(document).ready(function() {
|
||||
<script type="text/x-example-code" class="js-code-multiple">
|
||||
$(".js-example-basic-multiple").select2();
|
||||
|
||||
<select class="js-example-basic-multiple" multiple="multiple">
|
||||
<option value="AL">Alabama</option>
|
||||
...
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="multiple_max" class="row">
|
||||
<div class="col-md-4">
|
||||
<h1>Limited Multiple select boxes</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>maxSelectionLength</code> in the select2 options</p>
|
||||
|
||||
<p>
|
||||
<select class="js-example-basic-multiple-limit js-states form-control" multiple="multiple"></select>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h2>Example code</h2>
|
||||
|
||||
<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
|
||||
});
|
||||
|
||||
<select class="js-example-basic-multiple" multiple="multiple">
|
||||
<option value="AL">Alabama</option>
|
||||
...
|
||||
@ -424,6 +395,28 @@ $(".js-programmatic-multi-clear").on("click", function () { $exampleMulti.val(nu
|
||||
</script>
|
||||
</div>
|
||||
</section>
|
||||
<section id="multiple_max" class="row">
|
||||
<div class="col-md-4">
|
||||
<h1>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>maxSelectionLength</code> in the select2 options</p>
|
||||
|
||||
<p>
|
||||
<select class="js-example-basic-multiple-limit js-states form-control" multiple="multiple"></select>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<h2>Example code</h2>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Hidden until 4.0.0-beta.2 is released
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user