+0
日增长
9,890
stars
3,936
forks
272
watchers
98
prs
288
issues
15
releases
README
WOW.js
Reveal CSS animation as you scroll down a page.
By default, you can use it to trigger animate.css animations.
But you can easily change the settings to your favorite animation library.
Advantages:
- Smaller than other JavaScript parallax plugins, like Scrollorama (they do fantastic things, but can be too heavy for simple needs)
- Super simple to install, and works with animate.css, so if you already use it, that will be very fast to setup
- Fast execution and lightweight code: the browser will like it ;-)
- You can change the settings - see below
Follow @mattdelac_ for updates as WOW evolves.
LIVE DEMO ➫
Version
1.1.3
License
Commercial license
If you want to use WOW.js to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Purchase a WOW.js Commercial License at uplabs.com/posts/wow-js-commercial
Open source license
If you are creating an open source application under a license compatible with the GNU GPL license v3, you may use this project under the terms of the GPLv3.
Documentation
It just take seconds to install and use WOW.js!
Read the documentation ➫
Dependencies
- animate.css
Installation
- Bower
bash
bower install wowjs
- NPM
bash
npm install wowjs
Basic usage
In order to hide all elements when they are supposed to be hidden. (Anti Flickering)
- CSS
.wow {
visibility: hidden;
}
- HTML
html
- JavaScript
javascript
new WOW().init();
Advanced usage
- HTML
html
- JavaScript
javascript
var wow = new WOW(
{
boxClass: 'wow', // animated element css class (default is wow)
animateClass: 'animated', // animation css class (default is animated)
offset: 0, // distance to the element when triggering the animation (default is 0)
mobile: true, // trigger animations on mobile devices (default is true)
live: true, // act on asynchronously loaded content (default is true)
callback: function(box) {
// the callback is fired every time an animation is started
// the argument that is passed in is the DOM node being animated
},
scrollContainer: null // optional scroll container selector, otherwise use window
}
);
wow.init();
Asynchronous content support
In IE 10+, Chrome 18+ and Firefox 14+, animations will be automatically
triggered for any DOM nodes you add after calling wow.init(). If you do not
like that, you can disable this by setting live to false.
If you want to support older browsers (e.g. IE9+), as a fallback, you can call
the wow.sync() method after you have added new DOM elements to animate (but
live should still be set to true). Calling wow.sync() has no side
effects.
Contribute
You're more than welcome to contribute to this project. Please note: your code may be used as part of a commercial product if merged. Be clear about what license applTop issues
#136IDEA: Hide elements that scroll out of view.33 comments · 2014-10-29#252WOW not defined using npm package.32 comments · 2016-05-24#196Googlebot crawler doesnt see the content reveleaded by wow.js30 comments · 2015-06-17#234How use in a React Component?22 comments · 2016-01-19#175wow items aren't animated/shown in DOM elements hidden at pageload17 comments · 2015-04-10#185Animations not working with SVG when page is reload (F5)16 comments · 2015-05-21#352Cannot set property 'getPropertyValue' of undefined15 comments · 2021-07-02#65Use with any scrollable div14 comments · 2014-05-07
Latest release
Trigger DOM event on animation end 1.1.0 2015-04-04WOW.js now triggers the animationend event when the animation finishes. This can be used to attach event handlers to e.g. reset the animation (so it would be replayed on the next reveal.) See 164. Thanks @mdeboer!