-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
181 lines (156 loc) · 5.95 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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html>
<!--
This site managed by Maggie Yu ([email protected])
Big Straw Magazine 2014-2015
Last Updated 8/20/14
-->
<html>
<title>Big Straw Magazine</title>
<head>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.6.2.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="style.css">
<!--scrollers-->
<link href="jquery.mCustomScrollbar.css" rel="stylesheet" type="text/css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="jquery.mousewheel.min.js"></script>
<script src="jquery.mCustomScrollbar.js"></script>
<script type="text/javascript">
var moving;
function init() {
document.getElementById('home').style.top = '110px';
document.getElementById('about').style.top = '120px';
document.getElementById('read').style.top = '130px';
document.getElementById('photos').style.top = '140px';
moving = false;
}
function doMove(obj) {
obj.style.top = parseInt(obj.style.top)-2+'px';
if (obj.style.top != "-250px") {
setTimeout(function() { doMove(obj) },1); // call doMove in 1msec
}
else {
moving = false;
}
}
$(document).ready(function() {
(function($){
$(window).load(function(){
$("#pagetext").mCustomScrollbar({
set_width:false, /*optional element width: boolean, pixels, percentage*/
set_height:false, /*optional element height: boolean, pixels, percentage*/
horizontalScroll:false, /*scroll horizontally: boolean*/
scrollInertia:550, /*scrolling inertia: integer (milliseconds)*/
scrollEasing:"easeOutCirc", /*scrolling easing: string*/
mouseWheel:"pixels", /*mousewheel support and velocity: boolean, "auto", integer, "pixels"*/
mouseWheelPixels:60, /*mousewheel pixels amount: integer*/
autoDraggerLength:true, /*auto-adjust scrollbar dragger length: boolean*/
scrollButtons:{ /*scroll buttons*/
enable:false, /*scroll buttons support: boolean*/
scrollType:"continuous", /*scroll buttons scrolling type: "continuous", "pixels"*/
scrollSpeed:20, /*scroll buttons continuous scrolling speed: integer*/
scrollAmount:40 /*scroll buttons pixels scroll amount: integer (pixels)*/
},
advanced:{
updateOnBrowserResize:true, /*update scrollbars on browser resize (for layouts based on percentages): boolean*/
updateOnContentResize:false, /*auto-update scrollbars on content resize (for dynamic content): boolean*/
autoExpandHorizontalScroll:false, /*auto expand width for horizontal scrolling: boolean*/
autoScrollOnFocus:true /*auto-scroll on focused elements: boolean*/
},
callbacks:{
onScrollStart:function(){}, /*user custom callback function on scroll start event*/
onScroll:function(){}, /*user custom callback function on scroll event*/
onTotalScroll:function(){}, /*user custom callback function on scroll end reached event*/
onTotalScrollBack:function(){}, /*user custom callback function on scroll begin reached event*/
onTotalScrollOffset:0, /*scroll end reached offset: integer (pixels)*/
whileScrolling:false, /*user custom callback function on scrolling event*/
whileScrollingInterval:30 /*interval for calling whileScrolling callback: integer (milliseconds)*/
}
});
});
})(jQuery);
$("#home").mouseover(function(){
if (moving == false){
$("#home:not(:animated)").effect( "bounce", {times:3}, 300 );
}
});
$("#about").mouseover(function(){
if (moving == false){
$("#about:not(:animated)").effect( "bounce", {times:3}, 300 );
}
});
$("#read").mouseover(function(){
if (moving == false){
$("#read:not(:animated)").effect( "bounce", {times:3}, 300 );
}
});
$("#photos").mouseover(function(){
if (moving == false){
$("#photos:not(:animated)").effect( "bounce", {times:3}, 300 );
}
});
$('#home').click(function() {
var obj = document.getElementById('home');
if (moving == false) {
moving = true;
document.getElementById('about').style.top = "120px"
document.getElementById('read').style.top = "130px"
document.getElementById('photos').style.top = "140px"
doMove(obj);
$('#pagetext').attr('src', "hometext.html");
}
});
$('#about').click(function() {
var obj = document.getElementById('about');
if (moving == false) {
moving = true;
document.getElementById('home').style.top = "110px"
document.getElementById('read').style.top = "130px";
document.getElementById('photos').style.top = "140px"
doMove(obj);
$('#pagetext').attr('src', "abouttext.html");
}
});
$('#read').click(function() {
var obj = document.getElementById('read');
if (moving == false) {
moving = true;
document.getElementById('home').style.top = "110px"
document.getElementById('about').style.top = "120px"
document.getElementById('photos').style.top = "140px"
doMove(obj);
$('#pagetext').attr('src', "readtext.html");
}
});
$('#photos').click(function() {
var obj = document.getElementById('photos');
if (moving == false) {
moving = true;
document.getElementById('home').style.top = "110px"
document.getElementById('about').style.top = "120px"
document.getElementById('read').style.top = "130px"
doMove(obj);
$('#pagetext').attr('src', "photostext.html");
}
});
});
window.onload = init;
</script>
</head>
<body>
<div id = "cup"></div>
<div id = "connect"></div>
<div id = "home">Home</div>
<div id = "about">About</div>
<div id = "read">Read</div>
<div id = "photos">Photos</div>
<div id = "pagecontent">
<iframe id = "pagetext" src = "hometext.html" width = "100%" height = "100%" frameborder="0"></iframe>
</div>
<div id = "whitebox"></div>
<div id = "footer">
<center>Big Straw Magazine 2014-2015</center>
</div>
</body>
</html>