-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhoverable_love_button
More file actions
37 lines (30 loc) · 909 Bytes
/
hoverable_love_button
File metadata and controls
37 lines (30 loc) · 909 Bytes
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
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>
var y=0;
function myFunction() {
//alert("In function myFunction");
var x = document.getElementById("gl1");
x.style.color = "red";
}
function myFunction1() {
//alert("y :"+y);
if (y==0) {
//alert("In function myFunction1");
var x = document.getElementById("gl1");
x.style.color = "black";
}
}
function myFunction2() {
//alert("In function myFunction2");
var x = document.getElementById("gl1");
x.style.color = "red";
y=1;
}
</script>
<body>
<a href="#" onmouseover="myFunction()" onmouseleave="myFunction1()" onclick="myFunction2()"><i id="gl1" class="glyphicon glyphicon-heart" style="font-size:48px;color:black;"></i></a>
</body>
</html>