blob: f27008580274005dc10e8de1222ca89d25745039 [file] [log] [blame]
Unknown8e40a3b2017-07-30 14:47:14 -04001$(document).ready(function() {
2
3 // Transition effect for navbar and back-to-top icon
4 $(window).scroll(function() {
5 // checks if window is scrolled more than 500px, adds/removes solid class
6 if($(this).scrollTop() > 550) {
7 $('.navbar').addClass('solid');
8 $('.back-to-top').addClass('visible');
9 } else {
10 $('.navbar').removeClass('solid');
11 $('.back-to-top').removeClass('visible');
12 }
13
14 });
15
16
17 // Scrolling effect for Arrow icons
18 $("#scrollIcon").click(function(e) {
19 e.preventDefault();
20 $.scrollTo($("#about"), 1000);
21 });
22 $("#nav-about").click(function(e) {
23 e.preventDefault();
24 $.scrollTo($("#about"), 1000);
25 });
26 $("#nav-portfolio").click(function(e) {
27 e.preventDefault();
28 $.scrollTo($("#portfolio"), 1000);
29 });
30 $("#nav-contact").click(function(e) {
31 e.preventDefault();
32 $.scrollTo($("#contact"), 1000);
33 });
34 $(".navbar-brand").click(function(e) {
35 e.preventDefault();
36 $.scrollTo(0, 1000);
37 });
38
39 });