Blame view

bower_components/select2/docs/_includes/examples/multiple-max.html 738 Bytes
f6e211e4   Administrator   finish work part 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  <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>