-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.html
87 lines (79 loc) · 3.09 KB
/
example.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!doctype html>
<html>
<head>
<title>jQuery mobileScroll Examples</title>
<style type="text/css" media="screen">
body {}
.content { margin: 10px }
#scroller-1,
#scroller-2,
#scroller-3 {
background: #fff;;
width: 400px;
height: 400px;
overflow: auto;
border: 10px solid rgba(0,0,0,200);
-webkit-border-radius: 9px;
-webkit-box-shadow: 1px 1px 5px #000;
}
#scroller-2 {
position: absolute;
top: 20px;
right: 20px;
width: 200px;
}
#scroller-2 .content { margin: 0; }
#scroller-2 ul {
list-style-type: none;
width: 185px;
margin: 0;
padding: 0;
}
#scroller-2 li {
list-style-type: none;
height: 40px;
margin: 0 0 10 0;
padding: 0;
overflow: hidden;
padding: 0;
height: 40px;
line-height: 40px;
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.36, rgb(150,150,150)), color-stop(0.68, rgb(200,200,200)), color-stop(0.84, rgb(255,255,255)));
}
#scroller-2 li:hover {
background: -webkit-gradient(linear, left bottom, left top, color-stop(0.36, rgb(200,200,200)), color-stop(0.68, rgb(230,230,230)), color-stop(0.84, rgb(255,255,255)));
}
#scroller-2 li a {
display: block;
color: #000;
text-decoration: none;
padding: 0 10px;
}
#scroller-3 {width: 900px; height: 600px; }
#scroller-3 img { width: 2873px; height: 933px; }
</style>
</head>
<body>
<h1>jQuery mobileScroll Examples</h1>
<div id="scroller-1"><div class="content lipsum(100)"></div></div>
<div id="scroller-2"><div class="content"></div></div>
<h2><a href="http://www.flickr.com/photos/imuttoo/256552156/">Ginza Panorama</a></h2>
<div id="scroller-3">
<img src="http://farm1.static.flickr.com/98/256552156_f3b987ddc2_o.jpg">
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script src="http://more.handlino.com/javascripts/moretext-1.1.js" type="text/javascript"></script>
<script src="jquery.easing.1.3.js" type="text/javascript"></script>
<script src="jquery.mobileScroll.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#scroller-2 .content").moreText(30, function(s) {
$(this).html("<ul><li><a href='#'>" + s.join("</a></li><li><a href='#'>") + "</a></li></ul>");
});
$("#scroller-1").mobileScroll();
$("#scroller-2").mobileScroll();
$("#scroller-3").mobileScroll();
});
</script>
</body>
</html>