-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEvents2.html
More file actions
46 lines (40 loc) · 1.21 KB
/
Copy pathEvents2.html
File metadata and controls
46 lines (40 loc) · 1.21 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
<html>
<head> <i><h3><b> Events in JQuery</b></h3></i>
<title>Events 2</title>
<link rel="stylesheet" href="CSS/pratice.css">
</head>
<body>
<button id="btn1" >Click Me 1</button>
<button id="btn2"> Click Me 2</button>
<button id="btn3"> Click Me 3</button>
<p> Welcome to Event handling in JQuery</p>
<div id="div1" >
<ul>
<li> List 1</li>
<li> List 2</li>
<li> List 3</li>
</ul>
</div>
<div id="div2">
<ul>
<li> List 4</li>
<li> List 5</li>
<li> List 6</li>
</ul>
</div><br>
</body>
<script src="JS/jquery.js"></script>
<script>
$(document).ready(function(){
// $("#btn1").mouseenter(fn1);
// $("#btn2").mouseleave(fn2);
$("#btn3").hover(fn1,fn2);
function fn1(){
$("#div1,#div2").fadeOut(1000);
}
function fn2(){
$("#div1,#div2").fadeIn(1000);
}
});
</script>
</html>