pklauzinski / jscroll

An infinite scrolling plugin for jQuery.
http://jscroll.com/
1.11k stars 563 forks source link

Multiple jscroll in same page. #48

Closed prasanthbendra closed 9 years ago

prasanthbendra commented 9 years ago

How can I implement multiple jscroll in same page ?

I tired to implement 2 jscroll, but only one works, If i comment one the other one works.How can i make both of them work ?

regards, Prasanth

elouet commented 9 years ago

I have the same issue, I don't think the plug-in sustains this type of usage (unless it's my mistake). It would be nice to have several parallel incrementing columns on a single page.

pklauzinski commented 9 years ago

You certainly can. You may create as many jScroll instances on a page as you wish, each with its own set of options.

As shown on the official website, http://jscroll.com, there are three examples on the same page.

            $('[data-ui="jscroll-default"]').jscroll({
               debug: true
            });

            $('[data-ui="jscroll-example2"]').jscroll({
                autoTrigger: false,
                debug: true
            });

            $('[data-ui="jscroll-example3"]').jscroll({
                autoTriggerUntil: 3,
                debug: true
            });
borayeris commented 9 years ago

Not working.

pklauzinski commented 9 years ago

@borayeris - that doesn't help me resolve your problem. Please point me to an example of your code, or place one up on http://codepen.io/. Thanks.

borayeris commented 9 years ago

I forked your code. You will understand.

mkwsra commented 8 years ago

@borayeris You've to calm down buddy :smile: And @pklauzinski Can you show me how to solve such thing?

mkwsra commented 8 years ago

And he changed something did you check it out? https://github.com/borayeris/jscroll/commit/712070f875f52e0ef8f570b18ee1b01cd3ed457c

lucia33 commented 8 years ago

for my case, it doesn't work if the same default setting is expected, say I want all elements work on scroll (default)

Enalmada commented 6 years ago

If you got here from google search and are having trouble getting two jscroll at the same time, the pull request https://github.com/pklauzinski/jscroll/pull/119 above is probably the solution...it worked for me.