-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay12AddClass.html
More file actions
61 lines (52 loc) · 1.81 KB
/
Day12AddClass.html
File metadata and controls
61 lines (52 loc) · 1.81 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>
<style>
.addColor{
font-size: 250%;
color:red;
}
.additalic{
font-style: italic;
}
</style>
<script src="jquery-3.1.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#btn1').click(function(){
$("p").addClass('addColor');
});
$('#btn2').click(function(){
$("p").removeClass('addColor');
});
$('#btn3').click(function(){
$("p").addClass('additalic');
});
$('#btn4').click(function(){
$("p").removeClass('additalic');
});
$('#btn5').click(function(){
$("p").addClass('addColor additalic');
});
$('#btn6').click(function(){
$("p").removeClass();
});
});
</script>
</head>
<body>
<p>Hello Ulhas</p>
<table>
<tr>
<td><input id="btn1" type="button" style="width:200px" value="AddColor"></td>
<td><input id="btn2" type="button" style="width:200px" value="RemoveColor"></td>
</tr>
<tr>
<td><input id="btn3" type="button" style="width:200px" value="AddItalic"></td>
<td><input id="btn4" type="button" style="width:200px" value="RemoveItalic"></td>
</tr>
<tr>
<td><input id="btn5" type="button" style="width:200px" value="AddAll"></td>
<td><input id="btn6" type="button" style="width:200px" value="RemoveAll"></td>
</tr>
</body>
</html>