Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

var options = { backToTop: true }; #14

Open
DesignJuggler opened this issue Apr 25, 2015 · 2 comments
Open

var options = { backToTop: true }; #14

DesignJuggler opened this issue Apr 25, 2015 · 2 comments

Comments

@DesignJuggler
Copy link

Hi,

This is a great addition. It seems to work well in Chrome and Firefox but not in IE. Any suggestions on how to get it to work in IE?

Thanks

@curtisweeks
Copy link

Thanks! Which version of IE are you targeting?

It seems to be working for versions gte IE8 when I test using emulation.

IE7 recognizes scrollTo as native so I'm not sure why it's not firing (have tried making several minor variations). scrollTop seems to work better in the emulators so maybe try:

var backToTop = function() {
  if (settings.backToTop === true) {
    window.scrollTo(0, 0);
    document.body.scrollTop;
  }
}

@DesignJuggler
Copy link
Author

Hi,
Thanks for your reply. I'm using IE10 & IE11. Thanks for the backToTop function suggestion. I'll give it a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants