-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
48 lines (44 loc) · 1.03 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
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title</title>
</head>
<style>
div {
background-color:#333;
width:50px;
height:50px;
}
.red {
background-color:#a00;
}
.blue {
background-color:#137;
}
</style>
<body>
<div class="red"></div>
<div id="id"></div>
<div class="blue red"><div class="child-l1"></div><div class="child-l1"></div></div>
<script src="phidom.js"></script>
<script>
// phi('div').addClass('blue');
// phi('div').hasClass('blue');
// phi('div').toggleClass('blue');
// phi('div').toggleClass('red');
console.time('id');
//.08 is native
var id = phi('.red');
console.log(id.dataAttr('modal'));
console.log(id.dataAttr('modal', 'balls'));
console.log(id.dataAttr('modal'));
//document.getElementById('id');
console.timeEnd('id');
// console.log(phi('#dog'));
// phi('.red');
</script>
</body>
</html>