forked from tkrotoff/jquery-simplecolorpicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
182 lines (167 loc) · 6.19 KB
/
demo.html
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE html>
<html>
<head>
<title>Color picker for jQuery</title>
<meta name="description" content="A very simple jQuery color picker plugin."/>
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css"/>
<link rel="stylesheet" type="text/css" href="jquery.simplecolorpicker.css"/>
</head>
<body>
<form class="form-horizontal">
<fieldset>
<legend>Twitter Bootstrap form</legend>
<div class="control-group">
<label class="control-label" for="input01">Text input</label>
<div class="controls">
<input type="text" class="input-xlarge" id="input01">
</div>
</div>
<div class="control-group">
<label class="control-label" for="optionsCheckbox">Checkbox</label>
<div class="controls">
<label class="checkbox">
<input type="checkbox" id="optionsCheckbox" value="option1">
Option one
</label>
</div>
</div>
<div class="control-group">
<label class="control-label" for="select01">Select list</label>
<div class="controls">
<select id="select01">
<!-- Colors from Google Calendar -->
<option value="#7bd148">Green</option>
<option value="#5484ed">Bold blue</option>
<option value="#a4bdfc">Blue</option>
<option value="#46d6db">Turquoise</option>
<option value="#7ae7bf">Light green</option>
<option value="#51b749">Bold green</option>
<option value="#fbd75b">Yellow</option>
<option value="#ffb878">Orange</option>
<option value="#ff887c">Red</option>
<option value="#dc2127">Bold red</option>
<option value="#dbadff">Purple</option>
<option value="#e1e1e1">Gray</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="multiSelect">Multicon-select</label>
<div class="controls">
<select multiple="multiple" id="multiSelect">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="fileInput">File input</label>
<div class="controls">
<input class="input-file" id="fileInput" type="file">
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Save changes</button>
<button class="btn">Cancel</button>
</div>
</fieldset>
</form>
Pick a color:
<select name="select02">
<!-- Colors from Google Calendar -->
<option value="#7bd148">Green</option>
<option value="#5484ed">Bold blue</option>
<option value="#a4bdfc">Blue</option>
<option value="#46d6db">Turquoise</option>
<option value="#7ae7bf">Light green</option>
<option value="#51b749">Bold green</option>
<option value="#fbd75b">Yellow</option>
<option value="#ffb878">Orange</option>
<option value="#ff887c">Red</option>
<option value="#dc2127">Bold red</option>
<option value="#dbadff">Purple</option>
<option value="#e1e1e1">Gray</option>
</select>
The colors are from Google Calendar
<br/><br/>
Change background color:
<select name="select03">
<!-- More colors from Google Calendar -->
<option value="#ac725e">#ac725e</option>
<option value="#d06b64">#d06b64</option>
<option value="#f83a22">#f83a22</option>
<option value="#fa573c" selected="selected">#fa573c</option>
<option value="#ff7537">#ff7537</option>
<option value="#ffad46">#ffad46</option>
<option value="#42d692">#42d692</option>
<option value="#16a765">#16a765</option>
<option value="#7bd148">#7bd148</option>
<option value="#b3dc6c">#b3dc6c</option>
<option value="#fbe983">#fbe983</option>
<option value="#fad165">#fad165</option>
<option value="#92e1c0">#92e1c0</option>
<option value="#9fe1e7">#9fe1e7</option>
<option value="#9fc6e7">#9fc6e7</option>
<option value="#4986e7">#4986e7</option>
<option value="#9a9cff">#9a9cff</option>
<option value="#b99aff">#b99aff</option>
<option value="#c2c2c2">#c2c2c2</option>
<option value="#cabdbf">#cabdbf</option>
<option value="#cca6ac">#cca6ac</option>
<option value="#f691b2">#f691b2</option>
<option value="#cd74e6">#cd74e6</option>
<option value="#a47ae2">#a47ae2</option>
</select>
<br/><br/>
Change background color:
<select name="select04">
<!-- More colors from Google Calendar -->
<option value="#ac725e">#ac725e</option>
<option value="#d06b64">#d06b64</option>
<option value="#f83a22">#f83a22</option>
<option value="#fa573c">#fa573c</option>
<option value="#ff7537">#ff7537</option>
<option value="#ffad46">#ffad46</option>
<option value="#42d692">#42d692</option>
<option value="#16a765">#16a765</option>
<option value="#7bd148">#7bd148</option>
<option value="#b3dc6c">#b3dc6c</option>
<option value="#fbe983">#fbe983</option>
<option value="#fad165">#fad165</option>
<option value="#92e1c0">#92e1c0</option>
<option value="#9fe1e7">#9fe1e7</option>
<option value="#9fc6e7">#9fc6e7</option>
<option value="#4986e7">#4986e7</option>
<option value="#9a9cff">#9a9cff</option>
<option value="#b99aff">#b99aff</option>
<option value="#c2c2c2">#c2c2c2</option>
<option value="#cabdbf">#cabdbf</option>
<option value="#cca6ac">#cca6ac</option>
<option value="#f691b2">#f691b2</option>
<option value="#cd74e6">#cd74e6</option>
<option value="#a47ae2">#a47ae2</option>
</select>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.js"></script>
<script src="jquery.simplecolorpicker.js"></script>
<script>
$(document).ready(function() {
$('#select01').simplecolorpicker();
$('select[name="select02"]').simplecolorpicker({
picker: true
});
$('select[name="select03"]').simplecolorpicker().change(function() {
$(document.body).css('background-color', $('select[name="select03"]').val());
});
$('select[name="select04"]').simplecolorpicker({
picker: true
}).change(function() {
$(document.body).css('background-color', $('select[name="select04"]').val());
});
});
</script>
</body>
</html>