-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathportfolio.js
39 lines (34 loc) · 1.21 KB
/
portfolio.js
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
$(document).ready(function() {
// Transition effect for navbar and back-to-top icon
$(window).scroll(function() {
// checks if window is scrolled more than 500px, adds/removes solid class
if($(this).scrollTop() > 550) {
$('.navbar').addClass('solid');
$('.back-to-top').addClass('visible');
} else {
$('.navbar').removeClass('solid');
$('.back-to-top').removeClass('visible');
}
});
// Scrolling effect for Arrow icons
$("#scrollIcon").click(function(e) {
e.preventDefault();
$.scrollTo($("#about"), 1000);
});
$("#nav-about").click(function(e) {
e.preventDefault();
$.scrollTo($("#about"), 1000);
});
$("#nav-portfolio").click(function(e) {
e.preventDefault();
$.scrollTo($("#portfolio"), 1000);
});
$("#nav-contact").click(function(e) {
e.preventDefault();
$.scrollTo($("#contact"), 1000);
});
$(".navbar-brand").click(function(e) {
e.preventDefault();
$.scrollTo(0, 1000);
});
});