Comments (5)
Though, it's worth making it possible to initialize on document ready as well. It'll probably save some headaches with settings this up. I'll consider this in future releases.
Thanks for your contribution @alex9pro !
from aos.
Hi, It's because AOS listens for DOMContentLoaded
event and when you init AOS on document ready, the event is not triggered again, so AOS is not going to be initialized.
Put AOS.init()
outside document ready and it'll work fine.
You can also set different start event:
AOS.init({
startEvent: 'yourEvent'
});
and now you can trigger yourEvent
on document whenever you want and AOS will be initialized.
For example:
AOS.init({
startEvent: 'yourEvent'
});
$(document).on('ready', function() {
$(document).trigger('yourEvent');
});
from aos.
Good news @alex9pro, I fixed it while making AOS compatible with different module systems (#14), as this change was necessary to make AOS work as AMD module.
from aos.
@michalsnik, that is good news, thank you
from aos.
It will be available in version 1.2.0
from aos.
Related Issues (20)
- Is this project DEAD?. HOT 3
- AOS.refresh does not refresh the behaviour
- Doesn't work as before
- RTL support
- ScrollTo - anchor link correct position HOT 1
- Console Error but the animations still work HOT 1
- Getting a horizontal scrollbar due to AOS. When I set overflow-x: hidden, AOS stops working HOT 8
- Animation trigger too early when using other script like "load more" cards
- not working correctly with Next.js 13.4.19 HOT 6
- mobile responsive
- Using aos in Astro HOT 1
- AOS does not work for fetch data
- How to do an "exit animation" manually using AOS?
- Aos is not working properly HOT 1
- Scrolling HOT 1
- Not Working With Angular SSR Version 17 HOT 2
- Aos not working on Tailwind Css ..... HOT 2
- Parent element (body) isn't my main content element HOT 1
- AOS Animating each time a user visit to section HOT 2
- GH pages and AOS
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 aos.