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

anchors don't auto scroll if ajax or setTimeout is used #77

Open
Nicoduweb opened this issue Sep 30, 2016 · 2 comments
Open

anchors don't auto scroll if ajax or setTimeout is used #77

Nicoduweb opened this issue Sep 30, 2016 · 2 comments
Labels

Comments

@Nicoduweb
Copy link

@Nicoduweb Nicoduweb commented Sep 30, 2016

Hello,

I'm trying to use multiscroll.js after ajax load html.
All seems to work except "autoscroll" on load or refresh.

$(document).ready(function() {
  $.get( "multiscroll.php", function( data ) {
    $( "#myContainer" ).html( data );
    $('#myContainer').multiscroll({
      anchors: ['un', 'deux', 'trois', 'quatre', 'cinq', 'six'],
    });
  });
});

The problem can be reproduced with setTimeout function like that :

$(document).ready(function() {
  setTimeout(function(){
    $('#myContainer').multiscroll({
      anchors: ['un', 'deux', 'trois', 'quatre', 'cinq', 'six'],
    });
  }, 3000);
});

Am i doing something wrong ?

Thx

@Nicoduweb Nicoduweb changed the title anchros don't auto scroll if ajax or setTimeout is used anchors don't auto scroll if ajax or setTimeout is used Sep 30, 2016
@alvarotrigo

This comment has been minimized.

Copy link
Owner

@alvarotrigo alvarotrigo commented Sep 30, 2016

Feel free to create a pull request.
The solution seems to be the same one implemented in fullpage.js thanks to this PR

@Nicoduweb

This comment has been minimized.

Copy link
Author

@Nicoduweb Nicoduweb commented Oct 1, 2016

Thank you !
I'll read this.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.