-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjquery_example.html
More file actions
61 lines (48 loc) · 1.13 KB
/
jquery_example.html
File metadata and controls
61 lines (48 loc) · 1.13 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
<html>
<head>
<script src="jquery-3.6.0.js "></script>
<script>
$(document).ready(function(){
$("p").click (function(){
$(this).css("color","blue").html("I was Clicked");
})
});
$(document).ready(function(){
$("#b1").click(function(){
$("p").hide(500);
});
$("#b2").click(function(){
$("p").show("slow");
});
});
$(document).ready(function(){
$("p").on("click", function(){
$(this).css("color","blue").html("I was Clicked");
})
});
$(document).ready(function(){
$("p").click (function(){
$("ul").slideToggle("slow");
})
});
$(document).ready(function(){
$("li.g1").click(function(){
$(this).fadeOut(1000,function(){
$(this).fadeIn(2000, function(){ //Callback Hell
$(this).click();
});
})
})
});
</script>
</head>
<body>
<p>Click this text</p>
<ul>
<li> Data Structures </li>
<li class="g1"> Web Technologies</li>
<li > Data Science</li>
<li> AFLL </li>
</ul>
</body>
</html>