Skip to content

Commit acde333

Browse files
Hello World!
1 parent d421966 commit acde333

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ <h1>Programmer Gaurav</h1>
4444
</div>
4545
<nav>
4646
<ul>
47-
<li class="navopt"><a href="#">Home</a></li>
47+
<li class="navopt"><a href="#nav">Home</a></li>
4848
<li class="navopt"><a href="#work">Work</a></li>
4949
<li class="navopt"><a href="#skills">Skills</a></li>
5050
<li class="navopt"><a href="#about">About</a></li>
@@ -57,7 +57,7 @@ <h1>Programmer Gaurav</h1>
5757
</header>
5858
<!-- Navigation Bar Ends -->
5959
<!-- Title Start -->
60-
<div class="title">
60+
<div id="nav" class="title">
6161
<div class="type-wrap">
6262
<div id="typed-strings" class="typing">
6363
<h2>Hi, I am Gaurav.</h2>

js/script.js

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
var owl = $('.owl-carousel');
2+
$(function () {
3+
$('a[href*=\\#]:not([href=\\#])').on('click', function () {
4+
var target = $(this.hash);
5+
target = target.length ? target : $('[name=' + this.hash.substr(1) + ']');
6+
if (target.length) {
7+
$('html,body').animate({
8+
scrollTop: target.offset().top
9+
}, 1000);
10+
return false;
11+
}
12+
});
13+
});
214
owl.owlCarousel({
315
items: 1,
416
loop: true,
@@ -51,22 +63,22 @@ owl.owlCarousel({
5163
}
5264
});
5365
new WOW().init();
54-
$(document).ready(function() {
66+
$(document).ready(function () {
5567
$(".se-pre-con").fadeOut("slow");
56-
$('.toggle').click(function() {
68+
$('.toggle').click(function () {
5769
$('nav').toggleClass('active');
5870
});
59-
$(window).scroll(function() { // check if scroll event happened
71+
$(window).scroll(function () { // check if scroll event happened
6072
if ($(document).scrollTop() > 50) { // check if user scrolled more than 50 from top of the browser window
6173
$(".navbars").css("background-color", "#25499F"); // if yes, then change the color of class "navbar-fixed-top" to white (#f8f8f8)
6274
} else {
6375
$(".navbars").css("background-color", "transparent"); // if not, change it back to transparent
6476
}
6577
});
66-
$('.toggle').click(function() {
78+
$('.toggle').click(function () {
6779
$('nav').toggleClass('menu')
6880
});
69-
$('.navopt').click(function() {
81+
$('.navopt').click(function () {
7082
$('nav').toggleClass('menu')
7183
});
7284
});

0 commit comments

Comments
 (0)