-
Notifications
You must be signed in to change notification settings - Fork 112
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
Issues with ng-show/ng-hide #113
Comments
Yes, this absolutely solved the problem also for me! |
cool! merged #116 |
As per discussion in #119 merging PR #116 might have been premature. Also in the jsbin above I think I could easily fix the problem by using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, firstly, great plugin, I love it.
I have an element that starts both off the page and hidden (ng-hidden). After some user interaction this is un-hidden and brought into view (other things on the page get hidden). However inview detects it as being "in-view" right from the start (or certainly from the first scroll, even when the hidden element is still far from the bottom of the viewport), so when it actually comes into view the event is not triggered.
I made a gist to give you the idea here: https://jsbin.com/yahovejexi/1/edit?html,js,output
Looking at the code I can fix this by changing lines 96-98 like so:
The new var
isVisible
uses the same code as jquery to check if an element is visible ($(el).is(':visible')
). And then if not visible theninView
always returns false.This is exactly the behaviour I want, and I'm happy to PR it, but does this work for everyone else?
The text was updated successfully, but these errors were encountered: