-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjquery.html
More file actions
78 lines (76 loc) · 1.72 KB
/
jquery.html
File metadata and controls
78 lines (76 loc) · 1.72 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html>
<head>
<title>JQUERY</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
<style type="text/css">
.sqaure{
width: 150px;
height: 150px;
margin: 10px;
}
#green_c{
border-radius: 50%;
background: green;
}
#fadeoutcic{
border-radius: 50%;
background: green;
}
#red_s{
background: red;
}
#red_s1{
background: red;
}
#fadeout-text{
display: none;
}
</style>
</head>
<body>
<div class="sqaure" id="green_c"></div>
<div class="sqaure" id="fadeoutcic"></div>
<div class="sqaure" id="red_s"></div>
<div class="sqaure" id="red_s1"></div>
<p id="1t">This is gonna change</p>
<p id="2t">This will be shown</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/5X7WWVTrBvM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<br>
<p id="fadeout-text">Hey this is gonna fade.</p>
<button id="Cll">Click to toggle</button>
<script type="text/javascript">
$(".green_c").click(function(){
$("#1t").html("Changed");
$("#green_c").css("width","25px");
$("#green_c").css("background","blue");
});
$("#red_s").click(function(){
$(this).fadeOut("slow");
});
$("#red_s1").click(function(){
$("iframe").attr("src","https://www.youtube.com/watch?v=MG0ohHrULLM");
});
var teststatus=true;
$("#Cll").click(function(){
if(teststatus)
$("#fadeout-text").fadeOut(function(){
teststatus=false;
});
else
$("#fadeout-text").fadeIn(function(){
teststatus=true;
});
});
$("#fadeoutcic").click(function(){
$(this).animate({
width:"400px",
height:"100px"
},2000,function(){
$(this).fadeTo("slow",.33);
});
});
</script>
</body>
</html>