-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
58 lines (51 loc) · 1.73 KB
/
demo.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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script src="js/jquery-1.7.2.js"></script>
<link rel="stylesheet" type="text/css" href="style/linkbar.css">
<script type="text/javascript" src="js/linkbar.js"></script>
<style>
* {
margin: 0;
padding: 0;
font: 16px normal 'Microsoft YaHei';
}
body {
width: 90%;
border: 1px solid;
margin: 0 auto;
padding: 50px 0;
}
</style>
<script type="text/javascript">
$(function() {
var ctns = [
//item1
"测试内容1",
//item2
"<div>测试内容2</div><div>测试内容2</div><div>测试内容2</div><div>测试内容2</div><div style = 'background-color: rgb(233,234,162);height:300px;'> </div>",
//item3
"<div>测试内容3</div><div>测试内容3</div><div>测试内容3</div><div>测试内容3</div>",
//item4
"<div>测试内容4</div><div>测试内容4</div><div style = 'background-color: rgb(233,234,162);height:400px;width:200px'> </div>",
//item5
$("<div>").text("测试内容5"),
//item6
$("<div>").append($("<p>").text("测试内容6")).append($("<p>").text("测试内容6")).append($("<p>").text("测试内容6"))
];
//instance plug
var linkBar = new window.hy.linkBar({
element: $(".box"),
contents: ctns
});
console.log(linkBar);
});
</script>
</head>
<body>
<div class="box"></div>
<br/>
</body>
</html>