Skip to content

Commit 2b6fda4

Browse files
committed
jQuery Effects - hide() | show() | toggle()
1 parent f4fe6e0 commit 2b6fda4

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
.vscode
2+
.vscode
3+
.idea
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
6+
<script>
7+
$(document).ready(function () {
8+
$("#hide").click(function () {
9+
$("p").hide(1000);
10+
});
11+
$("#show").click(function () {
12+
$("p").show(1000);
13+
});
14+
15+
$("#toggleBtn").click(function () {
16+
$("p").toggle(1000);
17+
});
18+
});
19+
</script>
20+
</head>
21+
22+
<body>
23+
24+
<p>This is a paragraph 1.</p>
25+
<p>This is a paragraph 2.</p>
26+
27+
<button id="hide">Hide</button>
28+
<button id="show">Show</button>
29+
<button id="toggleBtn">Toggle</button>
30+
31+
</body>
32+
33+
</html>

0 commit comments

Comments
 (0)