-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathdemo.html
executable file
·40 lines (37 loc) · 1.15 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>JQueryDemo</title>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
<script>
$(document).ready(function() {
$("#select").click(function() {
$("#select").hide();
});
$("button").click(function() {
$("#select").toggle(slow);
});
});
</script>
</head>
<body>
<button type="button">选择器</button>
<p id="ptest">This is a p!</p>
<p id="select">选择器:<br>
<br> 元素选择器:("p")
<br> id选择器:("#test")
<br> class选择器:(".test")
<br> 当前元素:("this")
<br> 选择第一个p元素:("p:first")
<br> 选择带有href属性的元素:("[href]")
<br> 选取偶数位置的 <tr> 元素:("tr:even")
<br> 选取奇数位置的 <tr> 元素:("tr:odd")
</p>
<p>jQuery效果
隐藏/显示 淡入淡出 滑动 动画 停止动画
CallBack jQuery链
</p>
</body>
</html>