pklauzinski / jscroll

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

Monitor the scroll of the window and not the container #5

Closed nmaves closed 11 years ago

nmaves commented 11 years ago

You plugin is great and almost working for me. My issue is that the scrolls are not calculated correctly because my container does not have a height. All of the elements inside of my container are floated and therefore the container has a height of zero.

Any work arounds for this? Most of the other infinite scrolling plugins allow you to configure an element to bind the scrolling to with the default being $(window).

pklauzinski commented 11 years ago

jScroll will automatically bind to $(window) as long as the overflow-y property on your content element is not set to 'hidden' or 'scroll'. It sounds like in your case you are not setting this either, so the behavior should be triggered by scrolling the window, as long as your content goes close enough to the bottom of the window and is within your 'padding' parameter setting.