Blame view

bower_components/select2/docs/_includes/examples/basics.html 1.42 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  <section>
  
    <h1 id="basics" class="page-header">The basics</h1>
  
    <h2 id="single">Single select boxes</h2>
  
    <p>
      Select2 can take a regular select box like this...
    </p>
  
    <p>
      <select class="js-states form-control"></select>
    </p>
  
    <p>
      and turn it into this...
    </p>
  
    <div class="s2-example">
      <p>
        <select class="js-example-basic-single js-states form-control"></select>
      </p>
    </div>
  
    <pre class="code" data-fill-from=".js-code-basic"></pre>
  
  <script type="text/x-example-code" class="js-code-basic">
  $(document).ready(function() {
    $(".js-example-basic-single").select2();
  });
  
  <select class="js-example-basic-single">
    <option value="AL">Alabama</option>
      ...
    <option value="WY">Wyoming</option>
  </select>
  </script>
  
    <h2 id="multiple">Multiple select boxes</h2>
  
    <p>
      Select2 also supports multi-value select boxes. The select below is declared with the <code>multiple</code> attribute.
    </p>
  
    <div class="s2-example">
      <p>
        <select class="js-example-basic-multiple js-states form-control" multiple="multiple"></select>
      </p>
    </div>
  
    <pre data-fill-from=".js-code-multiple"></pre>
  
  <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>
  
  </section>
  
  </section>