File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+
4+ < head >
5+ < script src ="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js "> </ script >
6+ < script >
7+ $ ( document ) . ready ( function ( ) {
8+ $ ( "#fadeIn" ) . click ( function ( ) {
9+ $ ( "#div1" ) . fadeIn ( ) ;
10+ $ ( "#div2" ) . fadeIn ( "slow" ) ;
11+ $ ( "#div3" ) . fadeIn ( 3000 ) ;
12+ } ) ;
13+
14+ $ ( "#fadeOut" ) . click ( function ( ) {
15+ $ ( "#div1" ) . fadeOut ( ) ;
16+ $ ( "#div2" ) . fadeOut ( "slow" ) ;
17+ $ ( "#div3" ) . fadeOut ( 3000 ) ;
18+ } ) ;
19+ } ) ;
20+ </ script >
21+ </ head >
22+
23+ < body >
24+
25+ < p > Demonstrate fadeOut() | fadeIn() with different parameters. (Default fadeIn)</ p >
26+
27+ < button id ="fadeIn "> Click to fade in boxes</ button >
28+ < button id ="fadeOut "> Click to fade out boxes</ button > < br > < br >
29+
30+ < div id ="div1 " style ="width:80px;height:80px;background-color:red; "> </ div > < br >
31+ < div id ="div2 " style ="width:80px;height:80px;background-color:green; "> </ div > < br >
32+ < div id ="div3 " style ="width:80px;height:80px;background-color:blue; "> </ div >
33+
34+ </ body >
35+
36+ </ html >
You can’t perform that action at this time.
0 commit comments