-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathques5.html
35 lines (30 loc) · 802 Bytes
/
ques5.html
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
<!DOCTYPE html>
<html>
<head>
<title>Question 5</title>
<style type="text/css">
.target{
font-size: 100%;
text-align: center;
}
</style>
</head>
<body>
<div id="main">
<p class="target"> Some random content </p>
</div>
<div id="notmain">
<p class="target">This is another content</p>
</div>
<center><button class="target">Changing the font size of the element whose parent has id = main</button></center>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("button").click(function() {
$(".target").parent("#main").css('font-size', '200%');
});
});
</script>
<a href="contents.html">Navigate for other Questions </a>
</body>
</html>