-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples2.html
More file actions
51 lines (47 loc) · 1.78 KB
/
examples2.html
File metadata and controls
51 lines (47 loc) · 1.78 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
<!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="example2">
<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">dockToBottomFrom : 300</span><span class="date">01/01/2014</span></div></div></div></div>
</div>
<div class="content right">
<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">dockToTopFrom : 300</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");
$("#dockable1").dockIt({dockToBottomFrom:300});
$("#dockable2").dockIt({dockToTopFrom:300});
$(window).on({
'scroll': function(){
$("#scroll span").html($(window).scrollTop());
}
});
$("#switch").click(function(){
if(!dockables.eq(0).data('dockItAlive')){
$(this).addClass('active');
dockables.dockIt('initDock');
}else{
$(this).removeClass('active');
dockables.dockIt('stopDock');
}
});
});
</script>
</body>
</html>