Input website files

This commit is contained in:
Arjun Patel
2017-07-27 10:11:14 -07:00
commit 026a7ce1e4
41 changed files with 3496 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
$(function(){
$('a[href^="#"]').click(function(e){
var target = $(this).attr('href');
var strip = target.slice(1);
var anchor = $("a[name='"+ strip +"']");
e.preventDefault();
$('html, body').animate({
scrollTop: anchor.offset().top
}, 'slow');
return false;
});
});
$(window).scroll(function(){
var wScroll = $(this).scrollTop();
$('.containerIntro').css({
'transform' : 'translate(-50%, '+ wScroll/2 +'px)'
});
$('.coverPag').css({
'transform' : 'translate(-50%, '+ wScroll/2 +'px)'
});
$('.parallaxImg').css('background-position', '0 ' + -wScroll/4 + 'px');
$('.connect').css('top', -50 +(wScroll * .15) + 'px');
});
// navbar fade out when you scroll down and fade in when you scroll up
$(window).scroll(
{
previousTop: 0
},
function () {
var currentTop = $(window).scrollTop();
if (currentTop < 500) {
$(".header").fadeIn("medium");
}
else if (currentTop < this.previousTop) {
$(".header").fadeIn("medium");
}
else {
$(".header").fadeOut("medium");
}
this.previousTop = currentTop;
});