Git Product home page Git Product logo

wow's Introduction

WOW.js Build Status

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.

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

Installation

  • Bower
   bower install wowjs
  • NPM
   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

  <section class="wow slideInLeft"></section>
  <section class="wow slideInRight"></section>
  • JavaScript
new WOW().init();

Advanced usage

  • HTML
  <section class="wow slideInLeft" data-wow-duration="2s" data-wow-delay="5s"></section>
  <section class="wow slideInRight" data-wow-offset="10"  data-wow-iteration="10"></section>
  • 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 applies to your patch. The MIT license or public domain unlicense are permissive, and allow integration of your patch into this project as part of a commercial product.

The library is written in CoffeeScript, please update wow.coffee file.

We use grunt to compile and minify the library:

Install needed libraries

npm install

Get the compilation running in the background

grunt watch

Enjoy!

Bug tracker

If you find a bug, please report it here on Github!

Developer

Developed by Matt Delac, delac.io

Contributors

Thanks to everyone who has contributed to the project so far:

Initiated and designed by Vincent Le Moign, @webalys

wow's People

Contributors

4aficiona2 avatar apansky avatar attilaolah avatar bouki avatar bradcerasani avatar dandv avatar daynin avatar graingert avatar joshmatz avatar jpantonisse avatar kkirsche avatar kyleneedham avatar matthieua avatar mdeboer avatar moox avatar peterdavehello avatar phillipalexander avatar psorensen avatar tagrendy avatar taylorstine avatar tomasdev avatar webalys avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wow's Issues

OSX Firefox problem

Something wrong with WOW.js in Firefox (mac ver. 29). All animation running very fast and no screen detection.

wow.js removes background from animated element

I have a few elements with "background-image:url(blablabla)", but it seems that wow.js removes the background css from these elements.

I now have to add a separate child

with the background to a animated
  • Use with any scrollable div

    It seems like the code only takes into account a scrollable window. Could we use this on any scrollable div container? Like focusing only on elements inside <div id="myDiv"></div> and make them animate?

    Remove global animation settings

    JavaScript should not overwrite the CSS if not asked for it. We have to remove to global settings on delay, duration and iteration so the it doesn't overwrite the CSS.

    Only when a data-wow-* attribute is present, the CSS should be overwritten

    Support for Events

    Awesome work with this.

    What are your thoughts on adding event emitters? I hacked on my own so that I could easily hook into specific animation callbacks, but it isn't pretty. I wonder if other people would find that helpful.

    Is height:100% required for the html tag?

    My animations are triggered instantly on page-load (even if the elements are not visible and need to be scrolled down to see) when I don't have height: 100% applied to the html tag.

    Seems like in WOW.prototype.isVisible it is calculating viewBottom based on this.element.clientHeight and that value changes significantly depending on whether or not I have height: 100% on the html tag (this.element is the html tag).

    Any ideas?

    Update the readme file

    Since the plugin is not disabled on mobile devices any more.

    I'll reword the readme, this is just a remirder for myself so I don't forget about it.

    mobile:false option seems to break AngularJS form submission

    Not sure if this is a WOW-Angular-specific issue or more general, but if I init the library with mobile:false then my form's submit button does not run my AngularJS form validation and instead just automatically submits the form. If I remove mobile:false, it works fine.

    Wow stopped working in Chrome and IE

    Hey guys,

    first of all thanks for the great js-plugin. I used it tremendously on my site and I love the easy of use and customisation options while being light weight.

    Just as it still works in Safari, the wow-animations on my page http://new.circlerotterdam.nl/start (the ones when you scroll down, the navbar is animated without wow) worked also in Chrome and IE. But since a few weeks WOW stopped working without me changing anything in the code.

    I checked the init(), I checked if it works with pure animate.css. I can't seem to find the mistake. Would you please take a look. Looks to me like a Chrome and (!?) IE bug in the newer versions.

    Thank you.

    horizontal website

    is it somehow possible to modify/adjust/extend wow.js to add the .animated class when the element is in the view for horizontal scroll websites?

    Query Loader 2 + WOW.js

    Hi. I am using Query Loader 2 (http://gayadesign.com/scripts/queryLoader2/) to preload images on my site. It shows progres bar and when its finished, it opens the page. My problem is that wow.js animations are played during that progres bar and when my page opens nothing happens. I really dont know much about java, but is there any way of playing my animations after the page is fully loaded, like on this page: http://www.adhamdannaway.com/.

    Thanx in advance,
    Dragan

    background

    Sorry, don't know what went wrong there.

    Animate on load

    Hi.

    First, sorry for my bad English...

    Now I'm working with website, where I need to combine wow.js with flexslider. In most of cases slider is already being displayed, so I need to animate first slider's caption on load. Now wow.js is doing it randomly. Once it animates on load, once on scroll, after page loaded.

    P.S. In both cases scrolltop is 0.

    Thanks.

    Jquery Issue in wordpress

    I'm getting an issue with this plugin in wordpress 3.8 using jquery 1.10.2.
    I'm getting this message in google developer tools console:
    Uncaught TypeError: Cannot set property "jackInTheBox' of undefined.
    And of course it isn't working. Thanks for your help, and I appreciate your efforts!.

    Option to use data-wow-* only when wow reveal elements

    Is it possible already (or easily) to only use options like data-wow-delay when WOW reveal an element during a scroll event only (not for initial render) ?
    For example I'm building an page where depending on the screen size, you can get 3 elements animated by default if you have enough screen size. Currently my 3 elements have different delays to don't make all the things appear in the same time (.2s, .4s & 1s). The thing is, if I have a smaller screen (laptop), we just see the 2 first elements. So when we scroll, the element appears correctly but with a (normal) 1s delay (which is weird in this case).
    If I use data-wow-delay it works. It change delay BUT even if the elements are display without a scroll event (initial render with big screen).
    Is my question clear ?
    I'm not comfortable with coffee but I'll see what I can do to eventually add an option if you are ok.

    Page gets wider once the animations occur.

    After testing my web-app on a mobile device, I noticed that a white empty space appeared on the right. I went to my site in a browser, and found out that once I scroll, the scrollbar in x appears.

    After some time looking for the problem, I removed Wow.js and it worked how it was supposed to. I went to http://mynameismatthieu.com/WOW/index.html and noticed it happens in the page of this project aswell.

    Any ideas how to fix this?

    Init creates horizontal scroll

    It seems in some cases when initializing the script there is a padding being added to the right of the content, creating a horizontal scroll. Haven't been able to pinpoint what exact cases that cause this but it seems to relate to having elements positioned relative and / or fixed with a 100% width. This happens in Chrome and Safari, but in Firefox it only seems to add extra space that matches the scrollbar width (all browsers tested in OSX). Using WOW.js together with Animate.css.

    Support hover trigger

    Sometimes you want trigger animation on mouseover.

    It could be nice to set another CSS class to know when doing the animation.

    Example:

    {
        events: {
            viewport: 'jack',
            hover: 'boxHovered'
        }
    }
    class="boxHovered bounceIn"

    Or whatever. Otherwise you need to do something like:

    $('element').on('mouseover', function () {
        var $this = $(this);
        var effect = 'bounceIn';
    
        $this
            .addClass('animated ' + effect)
            .on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function () {
            $this.removeClass('animated ' + effect);
        });
    });

    It sads to do this while jackIntheBox is loaded.

    Bests

    Bower

    How do you install this with bower?

    Chrome / Opera conflict issue

    Hi guys,

    Love the script, I use it all the time.

    I am having some trouble figuring out why wow.js is disabling some background images on my site, only in Chrome and Opera. Works perfectly in Firefox and Safari. I've used this script many times before so I am assuming this is a conflict.

    If this is something you can spot immediately and help with I would greatly appreciate some advice.

    http://howdoyouroll.com/new/franchise/

    data-wow-delay by default

    Is it possible to set data-wow-delay for all wow animations?
    Something like this:

    var wow = new WOW(
      {
        delay: 0.5s
      }
    );
    wow.init();

    Scrolled element doesn't appear on refresh

    Hi, great plugin! Using it at the moment for my project and definitely will continue using it in the future!

    I stumbled on a little problem. When and element somewhere down the page is scrolled into view, it appears as it should, no problems so far, but when I refresh the page (the viewport is not reset at the top of the page), the element is in the viewport but it doesn't appear until I scroll a little.

    Is there a solution to this problem?

    Mobile animations only triggered when user stops scrolling

    Great library everyone. I am really loving it so far. I did notice one small issue. Currently on mobile the animations are only triggered when the user stops scrolling. Any way to fix this? If not is there a quick solution to disabling all together only on mobile screen sizes? Thanks

    Animations on Mobile

    Great script.

    Is there anyway to disable the animations on mobile devices? I'd rather have no animations for users with a screen width of 800px or below for example.

    Thanks a lot

    Fixed background

    On init() removes the background if the background-attachment is set to fixed. (On divs without .wow class, too). Any ideas?

    Not working in Firefox

    First: thank you a lot for this great work.
    I did exactly what was told in the instruction in the documentation page BUT it is not working in Firefox. even the demo page:http://mynameismatthieu.com/WOW/ is not working. the demo page in downloaded files doesn't work too. it works fine in chrome, opera, and even IE.but not in Firefox 29.0 ! can you tell me what to do to make work fine?

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo 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.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.