Skip to content

Loading…

Fix scroll on chrome. #3

Merged
merged 2 commits into from

5 participants

@paulmillr

Prev commit broken it in chrome but fixed in fx / opera. now it works everywhere

@EvilScott

I am also experiencing this issue on Chrome

@cjerdonek

I'm noticing this, too. Thanks for any fix.

@mattgraham
Owner

I'll make sure to get it merged to master today. Great work @paulmillr

@mattgraham mattgraham merged commit a9a0eaf into mattgraham:master
@mattgraham
Owner

Update has been pushed and the update to the GitHub branches will also be available after the user rebuilds the theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 9, 2012
  1. @paulmillr

    Fix scroll on chrome.

    paulmillr committed
Commits on May 7, 2012
  1. @paulmillr

    Use one selector.

    paulmillr committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 javascripts/main.js
View
4 javascripts/main.js
@@ -19,9 +19,9 @@ $(document).ready(function(){
$("nav ul li:first-child a").parent().addClass("active");
});
- $("nav ul li a").live("click",function(event) {
+ $("nav ul li").on("click", "a", function(event) {
var position = $($(this).attr("href")).offset().top - 190;
- $("html").animate({scrollTop: position},400);
+ $("html, body").animate({scrollTop: position}, 400);
$("nav ul li a").parent().removeClass("active");
$(this).parent().addClass("active");
event.preventDefault();
Something went wrong with that request. Please try again.