Created
October 7, 2013 17:33
-
-
Save optikalefx/6871767 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========== | |
// = Animated Scroll = | |
// ========== | |
(function($) { | |
$.modal = bootbox; | |
$('#top-section').parallax("50%", 0.1); | |
$('#work').parallax("50%", 0.3); | |
$('#about').parallax("50%", 0.1); | |
$('#services').parallax("50%", 0.1); | |
$('#contact').parallax("50%", 0.1); | |
$('.navbar').scrollspy() | |
//hide menu after click on mobile | |
$('.nav-collapse .nav > li > a').click(function(){ | |
$('.collapse.in').removeClass('in').css('height', '0'); | |
}); | |
$(".mainNav a").click(function(e) { | |
e.preventDefault(); | |
if(this.hash) { | |
var toPos = $(this.hash).position().top; | |
$("body,html").animate({ | |
scrollTop : toPos | |
}); | |
} | |
}); | |
$("#contactForm").on("submit",function(e) { | |
e.preventDefault(); | |
var data = $(this).serializeObject(); | |
$.post(this.action, data, function(res) { | |
$.modal.alert("Thanks, We'll get back to you shortly"); | |
}); | |
}); | |
})(jQuery); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment