Comments (2)
Hey Uranbold,
The idea behind the attributes is to give the markup more semantic meaning—didn't want to include classes to keep code light. You could use the callback function to add the animate.css classes. For example:
emergence.init({
reset: true,
callback: function(element, state) {
if (state === 'visible') {
element.classList.add('animated','bounce');
} else if (state === 'reset') {
element.classList.remove('animated','bounce');
}
}
});
Regarding your second point, that's doable but would require more code and it really could be achieved with simply CSS nth-child and transition / animation delay.
from emergence.js.
Also 1 more thing. If elements are in the Same Row then it's animated Instantly. I think it should delay between this 2 element.
It's becoming just like the waypoint ;)
from emergence.js.
Related Issues (18)
- Reset: false not working? HOT 2
- Uncaught TypeError: viewport.addEventListener is not a function... HOT 2
- Watched elements not visible when scrolled to on mobile HOT 1
- destroy method HOT 1
- init inside imagesloaded callback HOT 2
- Define "visible" HOT 2
- Use native Intersection Observer HOT 2
- Per-item options HOT 2
- Trigger animation when div is visible HOT 2
- DOM re-render implications? HOT 1
- IntersectionObserver HOT 3
- Offset in percentage or em?
- Multiple Instances of `emergence`?
- Staggering `data-emergence` Toggle
- Property override support per element HOT 1
- Doesn't work on load HOT 1
- Current project status HOT 1
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 emergence.js.