Comments (3)
Hi, @LeoAJ,
I have not experienced this in my own use of the directive. Do you have an example I can look at? Alternatively, you can add some logging from inside the directive to see the values you're getting.
from nginfinitescroll.
Hi @BinaryMuse
Thanks for replying, finally I found out the reason, since the firefox will return floats instead of integer when using jQuery offset()
, there is a good example here. Sorry I was not able to reproduce the same situation I ran into.
So, I console log to see the actual value of coordinate return by offset
function they are just slightly difference, for example 100.5
and 100
.
I would like to provide a solution which is in line 39 in order to use elem.offset().top
, we can round the decimal which is too small that we can ignore them, like this.
elementBottom = Math.floor(elem.offset().top) + elem.height();
Maybe it is not the best solution but for multi-browsers compatibility, I suggest to make some change about this due to jquery offset
return different values in different browsers.
Thanks!
Leo
from nginfinitescroll.
i just realized that i can set infinite-scroll-distance
... no problem now. Thanks and sorry for any confusing.
from nginfinitescroll.
Related Issues (20)
- Fires Permanently (& Causes to Reload Models Within) HOT 2
- Infinite-scroll function is not called when page is resized HOT 1
- ngInfiniteScroll causes high CPU usage on Cordova Android app
- Custom defined modules with infinite scroll - how to set the throttle parameter HOT 1
- infinite-scroll function is not fired if jQuery is not explicitly imported on index.html
- ngInfiniteScroll is firing two times in the call stack for single initialisation HOT 1
- How do I get the latest version of ngInfiniteScroll without using bower? HOT 4
- When using 'infiniteScrollContainer' attribute the calculation isn't according to the chosen container
- does it support angular2? HOT 4
- Is this implementation affected by this chrome bug? HOT 1
- Mobile Scroll down - makes new objects load, but takes me all the way back to the start
- Download from sroze.github.io still linking 1.0.0
- Injecting this module causes browser to not load angular app. HOT 1
- path change while scrolling
- 模型管理各个模块没有关联选项可以选择
- ngInifinitescroll is not working HOT 1
- infinte-scroll not triggering when container is unbinded and then rebinded
- What is the license for this package? HOT 1
- How to preserve the scroll position when navigating to another page and come back to the first page.
- How to get the scroll position
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginfinitescroll.