Comments (11)
@voidgraphics I ended up using inview, but when I added dynamic content I then just did this to refresh the DOM elements:
window.inView('.photo').check();
Works well for me :)
from in-view.
Go with Scrollama... itβs uses IntersectionObserver.
Works perfectly
from in-view.
It would appear not :/ Looks like I'm going to have to look for another module now, as I've just found out this one doesn't support dynamically added content. Eugh
from in-view.
@youradds have you found one? π
from in-view.
@youradds @voidgraphics see https://github.com/DanielRuf/noopener/blob/master/src/index.js and especially https://davidwalsh.name/detect-node-insertion
from in-view.
@DanielRuf interesting (and clever) solution by Mr. Walsh, however that does not feel very clean to me. I'd rather use a MutationObserver, which is the solution I am pursuing right now, but I was wondering if there was another in-view library that had this functionality baked-in.
Thank you for your answer π
from in-view.
MutationObserver
https://caniuse.com/#feat=mutationobserver
from in-view.
@voidgraphics what did you come up with for mutationobserver?
from in-view.
I ended up still using this library and adding another MO on top, but that felt really hacky and dirty so I wouldn't recommend going that route.
I think @youradds's suggestion might be better.
from in-view.
I found this one.. https://github.com/russellgoldenberg/scrollama - trying to cut my ties with jQuery and move to be more native. It uses IntrospectionObserver which should be lighter on the site.
from in-view.
ScrollMagic is probably the next best bet, and it just started to be maintained again after a donation.
from in-view.
Related Issues (20)
- Failed to execute 'observe' on 'MutationObserver': parameter 1 is not of type 'Node'. HOT 2
- inView.is Uncaught TypeError: Cannot read property 'getBoundingClientRect' of null HOT 2
- Is there a way to set multiple offsets for different DOM nodes
- How to tell if a 200vh element is at top of view? HOT 1
- Simplify `enter` / `exit` events processing with callback: possible to pass the event type into the callback?
- IntersectionObserver support HOT 9
- Accept single, or array of DOM elements
- Dynamic offset ? HOT 2
- Uncaught TypeError: this.handlers[t][n] is not a function in-view.min.js:6 HOT 1
- Replace lodash with lodash-es
- Feature request: loop on elements revealed at same position (stagger elements sequentially)
- Custom parent
- inView.is(YOUR_SELECTOR) throws an error HOT 2
- Can we get a non-minified distribution file please? HOT 1
- How to use this with React HOT 7
- Maybe this is a bad question, but trying to link script on a page yields this: HOT 5
- Tapping "Home" key does not fire enter / exit functions
- Get the data-attribute and classnames of the element on 'enter'?
- Not working in android WebView
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 in-view.