-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples1.html
More file actions
57 lines (53 loc) · 2.2 KB
/
examples1.html
File metadata and controls
57 lines (53 loc) · 2.2 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DockIt</title>
<link href='http://fonts.googleapis.com/css?family=Parisienne' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/styles.css" />
<link rel="stylesheet" href="css/sticky-note.css" />
</head>
<body class="example1">
<div>
<button id="switch" class="active">Dock / Undock</button>
<div id="scroll">Scroll Value : <span></span></div>
<div class="content left">
<div class="dockable" id="dockable1"><div class="sticky-note"><div class="sticky-bg"></div><div><div class="sticky-content"><span class="note">note</span><span class="info">scrollDown : true</span><span class="date">01/01/2014</span></div></div></div></div>
</div>
<div class="content center">
<div class="dockable" id="dockable2"><div class="sticky-note"><div class="sticky-bg"></div><div><div class="sticky-content"><span class="note">note</span><span class="info">scrollDown : true,<br />scrollUp : true</span><span class="date">01/01/2014</span></div></div></div></div>
</div>
<div class="content right">
<div class="dockable" id="dockable3"><div class="sticky-note"><div class="sticky-bg"></div><div><div class="sticky-content"><span class="note">note</span><span class="info">scrollUp : true</span><span class="date">01/01/2014</span></div></div></div></div>
</div>
</div>
<script src="lib/zepto/zepto.min.js"></script>
<script src="lib/zepto-data/zepto.data.min.js"></script>
<!--<script src="lib/jquery/jquery.min.js"></script>-->
<script src="dockit.min.js"></script>
<script>
$(document).ready(function(){
var dockables = $(".dockable");
$("#dockable3").dockIt({scrollUp:true});
$("#dockable2").dockIt({scrollDown:true,scrollUp:true});
$("#dockable1").dockIt({scrollDown:true});
$(window).on({
'scroll': function(){
$("#scroll span").html($(window).scrollTop());
}
});
$("#switch").click(function(){
if(!dockables.eq(0).data('dockItAlive')){
console.log('-----init');
$(this).addClass('active');
dockables.dockIt('initDock');
}else{
console.log('-----stop');
$(this).removeClass('active');
dockables.dockIt('stopDock');
}
});
});
</script>
</body>
</html>