-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjquery_exercises.html
More file actions
50 lines (41 loc) · 1.18 KB
/
jquery_exercises.html
File metadata and controls
50 lines (41 loc) · 1.18 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1 id="header" class="head">Stuff</h1>
<div id="div" class="div1">
<p id="para" class="paragraph">Testing the stuff</p>
<ul id="ul" class="unorg">
<li id="li1" class="li">ABCD</li>
<li id="li1" class="li">1234</li>
</ul>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/jquery_exercises.js">
// $(function() {
// alert( 'The DOM has finished loading!' );
// });
// let header= $('#header').html();
// alert(header);
// $(".li").css('font-size', '20px');
// $(".head, paragraph, li").css('background-color', '#FF0')
$('#header').click(function() {
$(this).css('background-color', '#FF0');
})
$('p').dblclick(function() {
$(this).css('font-size', '18px');
})
$('li').hover(
function() {
$(this).css('color', 'red');
},
function() {
$(this).css('color', 'black');
}
);
</script>
</body>
</html>