-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheventsInJquery.html
More file actions
103 lines (96 loc) · 3.78 KB
/
Copy patheventsInJquery.html
File metadata and controls
103 lines (96 loc) · 3.78 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.css">
<title>Events in JQuery</title>
<style>
body{
background-color: #636e72;
font-size: 24px;
}
.input-width{
margin: 0 auto;
width: 300px;
}
.row-h{
height: 200px;
}
.bg-pico6pink{
background-color: #fd79a8;
}
.bg-brightyarrow{
background-color: #fdcb6e;
}
.bg-lightgreenishbblue{
background-color: #55efc4;
}
.bg-palm-springs-splash{
background-color: #218c74;
}
.bg-eye-of-newt{
background-color: #b33939;
}
.bg-c64-purple{
background-color: #706fd3;
}
.color-pick{
padding: 0px;
width: 300px;
border: none;
margin: 0 auto;
}
</style>
</head>
<body>
<div class="container text-white">
<div class="text-center">
<h1 class="display-4 mt-1 mb-3 text-center">
Events In Jquery
</h1>
<input type="text" class="form-control input-width mb-3" placeholder="Enter font-weight">
<p class="lead">Choose para color</p>
<input type="color" class="form-control color-pick mb-5" value="#2c2c54">
<button class="btn btn-lg btn-outline-warning text-white px-5 clickEvent" value="true">Click Event</button>
<button class="btn btn-lg btn-outline-info text-white px-5 show ml-5" value="true" >Show</button>
<div class="row row-h my-5 font-weight-bold">
<div class="col bg-brightyarrow p-5 text-one">Lorem ipsum dolor sit amet.</div>
<div class="col bg-lightgreenishbblue p-5">Lorem ipsum dolor sit amet.</div>
<div class="col bg-pico6pink p-5">Lorem ipsum dolor sit amet.</div>
</div>
<div class="row row-h my-5 font-weight-bold section2">
<div class="col bg-c64-purple p-5 text-four">Lorem ipsum dolor sit amet.</div>
<div class="col bg-eye-of-newt p-5">Lorem ipsum dolor sit amet.</div>
<div class="col bg-palm-springs-splash p-5">Lorem ipsum dolor sit amet.</div>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$('.clickEvent').click(function(){
let fontWeight = $('.input-width').val();
let color = $('.color-pick').val();
console.log(color);
if(fontWeight != ''){
$('.col').css({"font-weight":fontWeight,"color":color});
$('.section2.col').css({"font-weight":fontWeight,"color":color+'a5'});
}
})
$('.show').hover(function(){
$('.text-one').show();
})
$('body').scroll(function(){
$(this).show();
console.log('scrolling');
})
})
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>