-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
37 lines (37 loc) · 881 Bytes
/
test.html
File metadata and controls
37 lines (37 loc) · 881 Bytes
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
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>IE Bug</title>
<style type="text/css">
#a{ width:500px; height:300px; position:relative; background:#000;}
#a a{ position:absolute; display:block; left:20px; top:20px; background:#ccc;}
</style>
</head>
<body>
<div id="wrap">
<div id="a">
<a href="#">//////////////////</a>
</div>
<input id="s1" type="button" value="开关div" />
<input id="s2" type="button" value="开关a" />
</div>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type="text/javascript">
jQuery(function($){
var div = $('#a'), a = $('a', div);
$('#s1').toggle(function(){
div.hide();
},function(){
div.show();
});
$('#s2').toggle(function(){
a.hide();
},function(){
a.show();
});
//End
});
</script>
</body>
</html>