Subversion-Projekte lars-tiefland.ci

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
776 lars 1
<!doctype html>
2
<html>
3
 
4
    <head>
5
        <title>jQuery MiniColors</title>
6
        <meta charset="utf-8">
7
        <!-- jQuery -->
8
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
9
        <!-- MiniColors -->
10
        <script src="jquery.minicolors.js"></script>
11
        <link rel="stylesheet" href="jquery.minicolors.css">
12
        <style>
13
            body {
14
                font: 16px sans-serif;
15
                line-height: 1.8;
16
                padding: 0 40px;
17
                margin-bottom: 200px;
18
            }
19
 
20
            a {
21
                color: #08c;
22
                text-decoration: none;
23
            }
24
 
25
            a:hover {
26
                text-decoration: underline;
27
            }
28
 
29
            .form-group {
30
                margin: 20px 0;
31
            }
32
 
33
            label {
34
                color: #888;
35
            }
36
        </style>
37
        <script>
38
            $(document).ready(function()
39
            {
40
                $('.demo').each(function()
41
                {
42
                    //
43
                    // Dear reader, it's actually very easy to initialize MiniColors. For example:
44
                    //
45
                    //  $(selector).minicolors();
46
                    //
47
                    // The way I've done it below is just for the demo, so don't get confused
48
                    // by it. Also, data- attributes aren't supported at this time. Again,
49
                    // they're only used for the purposes of this demo.
50
                    //
51
                    $(this).minicolors(
52
                    {
53
                        control: $(this).attr('data-control') || 'hue',
54
                        defaultValue: $(this).attr('data-defaultValue') || '',
55
                        inline: $(this).attr('data-inline') === 'true',
56
                        letterCase: $(this).attr('data-letterCase') || 'lowercase',
57
                        opacity: $(this).attr('data-opacity'),
58
                        position: $(this).attr('data-position') || 'bottom left',
59
                        change: function(hex, opacity)
60
                        {
61
                            var log;
62
                            try
63
                            {
64
                                log = hex ? hex : 'transparent';
65
                                if (opacity) log += ', ' + opacity;
66
                                console.log(log);
67
                            }
68
                            catch (e)
69
                            {}
70
                        },
71
                        theme: 'default'
72
                    });
73
                });
74
            });
75
        </script>
76
    </head>
77
 
78
    <body>
79
        <h1>MiniColors Demo (without Bootstrap)</h1>
80
        <p>
81
            <a href="index.html">&laquo; Back to the Bootstrap demo</a>
82
        </p>
83
        <!-- Control Types -->
84
        <h3>Control Types</h3>
85
        <div class="form-group">
86
            <label for="hue-demo">Hue (default)</label>
87
            <input type="text" id="hue-demo" class="demo" data-control="hue" value="#ff6161"> </div>
88
        <div class="form-group">
89
            <label for="saturation-demo">Saturation</label>
90
            <input type="text" id="saturation-demo" class="demo" data-control="saturation" value="#0088cc"> </div>
91
        <div class="form-group">
92
            <label for="brightness-demo">Brightness</label>
93
            <input type="text" id="brightness-demo" class="demo" data-control="brightness" value="#00ffff"> </div>
94
        <div class="form-group">
95
            <label for="wheel-demo">Wheel</label>
96
            <input type="text" id="wheel-demo" class="demo" data-control="wheel" value="#ff99ee"> </div>
97
        <!-- Input modes -->
98
        <h3>Input Modes</h3>
99
        <div class="form-group">
100
            <label for="text-field">Text field</label>
101
            <br>
102
            <input type="text" id="text-field" class="demo" value="#70c24a"> </div>
103
        <div class="form-group">
104
            <label for="hidden-input">Hidden Input</label>
105
            <br>
106
            <input type="hidden" id="hidden-input" class="demo" value="#db913d"> </div>
107
        <div class="form-group">
108
            <label for="inline">Inline</label>
109
            <br>
110
            <input type="text" id="inline" class="demo" data-inline="true" value="#4fc8db"> </div>
111
        <!-- Positions -->
112
        <h3>Positions</h3>
113
        <div class="form-group">
114
            <label for="position-bottom-left">bottom left (default)</label>
115
            <input type="text" id="position-bottom-left" class="demo" data-position="bottom left" value="#0088cc"> </div>
116
        <div class="form-group">
117
            <label for="position-top-left">top left</label>
118
            <input type="text" id="position-top-left" class="demo" data-position="top left" value="#0088cc"> </div>
119
        <div class="form-group">
120
            <label for="position-bottom-right">bottom right</label>
121
            <input type="text" id="position-bottom-right" class="demo" data-position="bottom right" value="#0088cc"> </div>
122
        <div class="form-group">
123
            <label for="position-top-right">top right</label>
124
            <input type="text" id="position-top-right" class="demo" data-position="top right" value="#0088cc"> </div>
125
        <!-- and more -->
126
        <h3>&hellip;and more!</h3>
127
        <div class="form-group">
128
            <label for="opacity">Opacity</label>
129
            <br>
130
            <input type="text" id="opacity" class="demo" data-opacity=".5" value="#766fa8"> </div>
131
        <div class="form-group">
132
            <label for="default-value">Default Value</label>
133
            <br>
134
            <input type="text" id="default-value" class="demo" data-defaultValue="#ff6600"> </div>
135
        <div class="form-group">
136
            <label for="letter-case">Letter Case</label>
137
            <br>
138
            <input type="text" id="letter-case" class="demo" data-letterCase="uppercase"> </div>
139
    </body>
140
 
141
</html>