-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
76 lines (60 loc) · 2.13 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/style/hello.css" />
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" ></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="nav">
<div class="container">
<span>
<img id ="img-logo" src="images/rainfall_logo3.png" height="60" width="80"></img>
</span>
<div class="logo">
<a href="#">Rainfall Analysis</a>
</div>
<div id="mainListDiv" class="main_list">
<ul class="navlinks">
<li><a href="#">State</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="container-fluid" id="background">
<!-- Search form -->
<div class="md-form
mt-0">
<input class="form-control" type="text" placeholder="Search for State or City . . . . ." id="search-bar" aria-label="Search">
</div>
</div>
</div>
<span class="navTrigger">
<i></i>
<i></i>
<i></i>
</span>
</div>
</nav>
<section class="home"></section>
<!-- Jquery needed -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="JS.js"></script>
<!-- Function used to shrink nav bar removing paddings and adding black background -->
<script>
$(window).scroll(function() {
if ($(document).scrollTop() > 50) {
$(".nav").addClass("affix");
console.log("OK");
} else {
$(".nav").removeClass("affix");
}
});
</script>
</body>
</html>