Skip to content
Snippets Groups Projects
Commit 3ba328e3 authored by David Miller's avatar David Miller Committed by GitHub
Browse files

Merge pull request #70 from rrikesh/gh-pages

Don't let the user lose scroll control when a '.page-scroll a' is cli…
parents 561dec5f 5043b2b0
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ $(function() { ...@@ -54,7 +54,7 @@ $(function() {
//clear all fields //clear all fields
$('#contactForm').trigger("reset"); $('#contactForm').trigger("reset");
}, },
}) });
}, },
filter: function() { filter: function() {
return $(this).is(":visible"); return $(this).is(":visible");
......
...@@ -8,9 +8,16 @@ ...@@ -8,9 +8,16 @@
$(function() { $(function() {
$('body').on('click', '.page-scroll a', function(event) { $('body').on('click', '.page-scroll a', function(event) {
var $anchor = $(this); var $anchor = $(this);
$('html, body').stop().animate({
$('html, body')
.bind('scroll mousedown DOMMouseScroll mousewheel keyup', function(){
$('html, body').stop();
})
.stop()
.animate({
scrollTop: $($anchor.attr('href')).offset().top scrollTop: $($anchor.attr('href')).offset().top
}, 1500, 'easeInOutExpo'); }, 1500, 'easeInOutExpo');
event.preventDefault(); event.preventDefault();
}); });
}); });
...@@ -29,7 +36,7 @@ $(function() { ...@@ -29,7 +36,7 @@ $(function() {
// Highlight the top nav as scrolling occurs // Highlight the top nav as scrolling occurs
$('body').scrollspy({ $('body').scrollspy({
target: '.navbar-fixed-top' target: '.navbar-fixed-top'
}) });
// Closes the Responsive Menu on Menu Item Click // Closes the Responsive Menu on Menu Item Click
$('.navbar-collapse ul li a:not(.dropdown-toggle)').click(function() { $('.navbar-collapse ul li a:not(.dropdown-toggle)').click(function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment