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

How to stop autobrowsing #13

Open
ghost opened this issue May 14, 2015 · 1 comment
Open

How to stop autobrowsing #13

ghost opened this issue May 14, 2015 · 1 comment

Comments

@ghost
Copy link

ghost commented May 14, 2015

i tried this, but its making endless new ajax calls on the end anyway:

    complete: function(obj, response, newElements) {
        if (newElements.length == 0) {
            this.stopFunction;
            return false;
        }
        myMasonry.masonry('appended', newElements);
        myMasonry.masonry('reload');
        myMasonry.imagesLoaded(function() {
            myMasonry.masonry('reload');
        });
    }
@taenadar
Copy link

For everyone else that has this problem: this issue can be solved by changing the var _stopPlugin method.

I modified it to this:
var _stopPlugin = function (handler) { $.unbind('scroll', handler); jQuery(window).unbind("scroll", handler); options.finished.call(obj); };

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

1 participant