Projekt

Obecné

Profil

Stáhnout (3.52 KB) Statistiky
| Větev: | Revize:
1
<!doctype html>
2
<html>
3
<head>
4
    <meta charset="utf-8">
5
    <title>jquery-multi-select</title>
6
    <link rel="stylesheet" type="text/css" href="../src/example-styles.css">
7
    <link rel="stylesheet" type="text/css" href="demo-styles.css">
8
</head>
9
<body>
10

    
11
    <form class="demo-example">
12
        <label for="people">Select people:</label>
13
        <select id="people" name="people" multiple>
14
            <option value="alice">Alice</option>
15
            <option value="bob">Bob</option>
16
            <option value="carol">Carol</option>
17
        </select>
18
    </form>
19

    
20
    <form class="demo-example">
21
        <label for="categories">Show:</label>
22
        <select id="categories" name="categories" multiple>
23
            <option value="a">Abandoned vehicles</option>
24
            <option value="b">Bus stops</option>
25
            <option value="c">Car parking</option>
26
            <option value="d">Dog fouling</option>
27
        </select>
28
    </form>
29

    
30
    <form class="demo-example">
31
        <label for="ice-cream">Build an ice cream:</label>
32
        <select id="ice-cream" name="ice-cream" multiple>
33
            <option value="Cone">Just a cone</option>
34
            <optgroup label="Flavours">
35
                <option value="Vanilla">Vanilla</option>
36
                <option value="Chocolate">Chocolate</option>
37
                <option value="Pistachio">Pistachio</option>
38
            </optgroup>
39
            <optgroup label="Toppings">
40
                <option value="Sprinkles">Sprinkles</option>
41
                <option value="Chocolate chips">Chocolate chips</option>
42
            </optgroup>
43
            <optgroup label="Sauces">
44
                <option value="Strawberry sauce">Strawberry sauce</option>
45
                <option value="Chocolate sauce">Chocolate sauce</option>
46
            </optgroup>
47
        </select>
48
    </form>
49

    
50
    <div class="demo-example position-menu-within">
51
        <label for="line-wrap-example">Line wrap example</label>
52
        <select id="line-wrap-example" multiple>
53
            <option>The final option…</option>
54
            <option>Should wrap onto…</option>
55
            <option>Multiple lines, to avoid expanding outside the grey wrapper</option>
56
        </select>
57
    </div>
58

    
59
    <form class="demo-example modal-example">
60
        <label for="modal-example">Modal example</label>
61
        <select id="modal-example" name="inventors" multiple>
62
            <option value="al">Ada Lovelace</option>
63
            <option value="gh">Grace Hopper</option>
64
            <option value="hl">Hedy Lamarr</option>
65
            <option value="mk">Margaret E. Knight</option>
66
            <option value="sj">Shirley Ann Jackson</option>
67
        </select>
68
    </form>
69

    
70
    <script type="text/javascript" src="../test/lib/jquery-2.2.4.min.js"></script>
71
    <script type="text/javascript" src="../src/jquery.multi-select.js"></script>
72
    <script type="text/javascript">
73
    $(function(){
74
        $('#people').multiSelect();
75
        $('#ice-cream').multiSelect();
76
        $('#line-wrap-example').multiSelect({
77
            positionMenuWithin: $('.position-menu-within')
78
        });
79
        $('#categories').multiSelect({
80
            noneText: 'All categories',
81
            presets: [
82
                {
83
                    name: 'All categories',
84
                    all: true
85
                },
86
                {
87
                    name: 'My categories',
88
                    options: ['a', 'c']
89
                }
90
            ]
91
        });
92
        $('#modal-example').multiSelect({
93
            'modalHTML': '<div class="multi-select-modal">'
94
        });
95
    });
96
    </script>
97

    
98
</body>
99
</html>
(2-2/2)