-
Notifications
You must be signed in to change notification settings - Fork 4
/
ranking.html
102 lines (85 loc) · 2.76 KB
/
ranking.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
<!DOCTYPE html>
<html lang="en">
<!--排行榜-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,inital-scale=1,maximum-scale=1,user-scalable=0"/>
<meta name="description" content>
<meta name="author" content>
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="css/nav.css" type="text/css" rel="stylesheet">
<link href="css/ranking.css" type="text/css" rel="stylesheet">
<script src="js/jquery-3.1.1.min.js" type="text/javascript"></script>
<title>bilibili</title>
</head>
<body>
<!-- 标题栏开始 -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<a class="navbar-brand" href="recommend.html">
<img src="image/rangking/back.png" onclick="jump('back')" width="20px">
</a>
<span>排行榜</span>
</div>
</div>
</nav>
<div class="site-wrapper">
<div class="site-wrapper-inner">
<div class="cover-container">
<div class="masthead clearfix">
<div class="inner">
<nav>
<ul class="nav masthead-nav">
<li class="active"><a onclick="jump('1')">原创</a></li>
<li><a onclick="jump('2')">全站</a></li>
<li><a onclick="jump('3')">番剧</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</div>
<!-- 标题栏结束 -->
<div style="width: 100%;height: 102px;"></div>
<!--动态加载-->
<div id="mydiv"></div>
<script>
window.onload = function () {
$("#mydiv").load("ranking-original.html",function () {
$("#mydiv").fadeIn(1);
})
//动态点击导航改变状态
$('li').on('click',function () {
$('li').removeClass('active');
$(this).addClass('active');
})
};
// 通过获取屏幕滚动距离动态修改导航位置
// window.onscroll = function(){
// var t = document.documentElement.scrollTop || document.body.scrollTop;
// };
function jump(object) {
var url;
if(object=='1'){
url="ranking-original.html";
}
if(object=="2"){
url="ranking-all.html";
}
if(object=="3"){
url="ranking-drama.html";
}
if(object=='back'){
window.location.href="recommend.html"
}
$("#mydiv").load(url,function () {
$("#mydiv").fadeIn(100);
})
}
</script>
</body>
</html>