blob: cde7cca16d5ecc8bd30d4e2090f7bd524876766b (
plain) (
blame)
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
|
<div class="col-md-6">
<h2>Examples</h2>
<div class="demo-wrapper">
<p>1) Attached to a field with hex format specified via options:</p>
<div class="well">
<input type="text" class="form-control demo demo-1 demo-auto" value="#5367ce" />
<pre class="markup">
<input type="text" class="demo1" value="#5367ce" />
<script>
$(function(){
$('.demo1').colorpicker();
});
</script>
</pre>
</div>
</div>
<p>As a component:</p>
<div class="well">
<div class="input-group colorpicker-component demo demo-auto">
<input type="text" value="" class="form-control" />
<span class="input-group-addon"><i></i></span>
</div>
<pre class="markup">
<div class="input-group demo2">
<input type="text" value="" class="form-control" />
<span class="input-group-addon"><i></i></span>
</div>
<script>
$(function(){
$('.demo2').colorpicker();
});
</script>
</pre>
</div>
<p>Using events to work with the color:</p>
<div class="well">
<a href="#" class="btn small demo" id="demo_apidemo" data-color="rgb(255, 255, 255)">Change background color</a>
</div>
<p>Horizonal mode:</p>
<div class="well">
<input type="text" class="form-control demo" data-horizontal="true" id="demo_forceformat" value="#8fff00" >
</div>
<p>Inline mode:</p>
<div class="well">
<div id="demo_cont" class="demo demo-auto inl-bl" data-container="#demo_cont" data-color="rgba(150,216,62,0.55)" data-inline="true"></div>
<div class="demo demo-auto inl-bl" data-container="true" data-color="rgb(50,216,62)" data-inline="true"></div>
</div>
<p>Enabled / disabled</p>
<div class="well">
<div id="demo_endis" class="input-group demo demo-auto colorpicker-component">
<input disabled type="text" value="" class="form-control" />
<span class="input-group-addon"><i></i></span>
</div>
<br>
<a class="btn btn-sm btn-default enable-button" href="#">Enable</a>
<a class="btn btn-sm btn-default disable-button" href="#">Disable</a>
</div>
<a class="btn btn-default demo-destroy" href="#"><i class="glyphicon glyphicon-remove"></i> Destroy plugin instances</a>
<a class="btn btn-default demo-create" href="#"><i class="glyphicon glyphicon-plus"></i> Create instances again</a>
</div>
|