forked from p-m-p/jQuery-Stickybox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmulti.html
73 lines (72 loc) · 2.25 KB
/
multi.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
<!DOCTYPE html>
<html>
<head>
<title>jQuery stickysidebar plugin</title>
<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:extralight,light,regular,bold' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../style/default.css" media="screen" />
<link rel="stylesheet" href="style/sticky.css" media="screen" />
</head>
<body>
<div id="realtest">
<div id="innerposi">
<div id="floatedbox" class="stickybox">Floated box</div>
</div>
</div>
<div id="wrap">
<header>
<h1>jQuery Sticky Sidebar</h1>
<div id="left">
<h2>Left column</h2>
<ol id="navbox" class="stickybox">
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Contact</a></li>
</ol>
</div>
<div id="middle">
<ul>
<li>
<a href="#" class="remove" rel="navbox">Remove nav box</a>
</li>
<li>
<a href="#" class="remove" rel="basket">Remove basket</a>
</li>
<li>
<a href="#" class="remove" rel="floatedbox">Remove box</a>
</li>
<li>
<a href="#" id="destroyAll">Destroy all</a>
</li>
</ul>
</div>
<div id="right">
<h2>Right column</h2>
<div id="basket" class="stickybox">
<h3>Your basket</h3>
<p>Total: <strong>£455.00</strong></p>
<span id="items">4</span>
</div>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/stickysidebar.jquery.js"></script>
<script>
$(function () {
$(".stickybox").stickySidebar({
speed: 400
, easing: "easeInOutQuad"
, constrain: true
});
$(".remove").click(function (ev) {
ev.preventDefault();
$("#" + this.rel).stickySidebar("remove");
});
$("#destroyAll").click(function (ev) {
ev.preventDefault();
$(".stickybox").stickySidebar("destroy");
});
});
</script>
</body>
</html>