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

Bottomreached event firing immediately after scrollz initialized. #12

Open
bryantAXS opened this issue Mar 4, 2013 · 2 comments
Open
Labels

Comments

@bryantAXS
Copy link

I'm using the jquery mobile auto-loading and I have a content div with the height of about 730 pixels. When the page loads the bottomreached event is firing and I am unable to scroll further down the page.

On line 674 of the plugin I see that there is a check to tell when you hit the bottom, I'm wondering if that math is incorrect? When I console.log out the params used to determine if we're at the bottom I get

container.scrollTop(): 133
container.height(): 730
detectionOffset: 86.3
container.get(0).scrollHeight: 893

The math makes sense why it would be hitting the bottom but obviously something must be incorrect as I'm at the top of the page... Any thoughts?

@bryantAXS
Copy link
Author

I got it to work when I set the content container's height to the height of the window, but I'm thinking this probably isn't the correct way of solving the issue.

$content_container.scrollz('height', $(window).height() - 55);

@zippy1978
Copy link
Owner

Hi,
The event is fired when you are 10% before the bottom of your content by default (see bottomDetectionOffset option).

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

2 participants