-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
46 lines (42 loc) · 1.33 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Studio42 color palette plugin</title>
<link rel="stylesheet" href="colorPalette.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="jquery.colorPalette.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
var pal = $('<input type="text"/>').appendTo($('#p1')).colorPalette({
palette : 'crayons',
color : '#000',
// manual : false,
select : function(c) { console.log('color: '+c)},
hover : function(c) { console.log('hover on: '+c)},
bindTo : $('#l')[0]
});
//
// setTimeout(function() {
// // pal.colorPalette('palette', 'crayons')
// pal.colorPalette('destroy')
// }, 6000);
// console.log(pal.val())
// var p2 = $('<div/>').colorPalette()
//
// setTimeout(function() {
// console.log('append')
// p2.appendTo($('#p2'))
// }, 2000);
// $('<div/>').appendTo($('#p2')).colorPalette({
// hover : function(c) { console.log(c)}
// })
})
</script>
</head>
<body>
<div id="p1"></div>
<div id="p2"></div>
<div id="l"></div>
</body>
</html>