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

infinite-scroll function is not fired if jQuery is not explicitly imported on index.html #371

Open
yudarik opened this issue Sep 18, 2017 · 0 comments

Comments

@yudarik
Copy link

yudarik commented Sep 18, 2017

Hi,
I use infinite-scroll on an angular 1.6.x project. and I discovered that it's not working if jQuery is not loaded explicitly directly from index.html even if jQuery is imported with webpack bandle.

Looking at the code, I can see that this function is never returns a value, instead it returns from the if statement where elem.css('none') returns a selector instead of undefined.

offsetTop = function(elem) { if (!elem[0].getBoundingClientRect || elem.css('none')) { return; } return elem[0].getBoundingClientRect().top + pageYOffset(elem); };

Any idea what is elem.css('none') used for and why is it needed here?
Removing it resolves the jQuery dependency load from index.html

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