-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShowHideEffect.html
More file actions
44 lines (44 loc) · 997 Bytes
/
ShowHideEffect.html
File metadata and controls
44 lines (44 loc) · 997 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
38
39
40
41
42
43
44
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ShowHideEffect</title>
<style type = "text/css"></style>
<script src="jquery-3.2.1.min.js"></script>
<script>
$(document).ready(function() {
$('p.more').hide();
$('a.short').hide();
$('a.more1').click(function() {
$('p.more').show();
$(this).hide();
$('a.more2').hide();
$('a.short').show();
return false;
});
$('a.more2').click(function() {
$('p.more').show('slow');
$(this).hide();
$('a.more1').hide();
$('a.short').show();
return false;
});
$('a.short').click(function() {
$('p.more').hide('500');
$('a').show();
$(this).hide();
return false;
});
});
</script>
</head>
<body>
<div>
<p>jQuery is a JavaScript Library</p>
<p class="more">jQuery was invented in 2006 by John Resig at BarCamp</p>
<a href="#" class="more1">more1</a>
<a href="#" class="more2">more2</a>
<a href="#" class="short">hide</a>
</div>
</body>
</html>