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

Can't have 2 jscroll instances on the same page #78

Open
Marvin256 opened this issue Sep 23, 2015 · 6 comments
Open

Can't have 2 jscroll instances on the same page #78

Marvin256 opened this issue Sep 23, 2015 · 6 comments
Assignees
Labels

Comments

@Marvin256
Copy link

Hello

I'm trying to make jscroll to work with 2 instances in the same time: I want to load next posts in the middle of the page and next instagram posts at the bottom of the page.

I can make the first one to work but not the second one and vice versa.

Here's how I do it:

$('#lazy-posts').jscroll(
    {
        debug: true,
        loadingHtml:'',
        padding: 0,
        nextSelector: 'a.jscroll-next-posts:last',
        contentSelector: ''
    }
);
// lazy loading instagram
$('#lazy-instagram').jscroll(
    {
        loadingHtml:'',
        padding: 0,
        nextSelector: 'a.jscroll-next-instagram:last',
        contentSelector: ''
    }
);

Is it possible to do this?

@Marvin256
Copy link
Author

Gave up with this one and coded my own lazy loader :-)

I don't know why I couldn't make this to work like the exemple on jscroll.com (3 instances at the same time)

@hoannv
Copy link

hoannv commented Oct 21, 2015

+1
I have same problem

@hoannv
Copy link

hoannv commented Oct 21, 2015

@pklauzinski can you instruct how make jscroll to work with multiple instances at same page ?

@pklauzinski pklauzinski self-assigned this Oct 21, 2015
@pklauzinski
Copy link
Owner

It depends on how you set them up. Are you trying to put them in separate containers on a page that have a fixed height and overflow-y: auto or overflow-y: scroll set? This is how the examples are set up on jscroll.com. Otherwise, please provide an example of how you are attempting to place multiple instances on one page.

@mrIllo
Copy link

mrIllo commented Dec 20, 2016

Just made a pull request that contains an extension to support multiple jscrolls.

@Enalmada
Copy link

Enalmada commented May 24, 2018

If you are having trouble getting two jscroll at the same time, the pull request #119 above is probably the solution...it worked for me.

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

No branches or pull requests

5 participants