Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It appears that the article and the <a href="http://www.netmagazine.com/files/tutorials/demos/2013/01/getting-css-animations-to-trigger-at-the-right-time/demo/demo.html" rel="nofollow">working demo</a> aren't exactly in sync.</p> <p>I managed to get the demo working in a <a href="http://jsfiddle.net/davidcl64/BXXAK/3/" rel="nofollow">fiddle</a></p> <p>A couple things to note:</p> <ul> <li>You <em>may</em> need to use the modified version of appear as in the fiddle. <a href="http://www.3magine.com/wp-content/themes/3magine/js/jquery.appear-1.1.1.modified.js" rel="nofollow">Located here</a></li> <li>jQuery Appear has some logic that <strong>must</strong> relied on <code>$(window).load</code>, so the initialization logic has to run outside of a ready handler or trigger <code>load</code>.</li> <li>The demo's loading animations were triggered when all pending images finished pre-loading</li> </ul> <p>With code copied directly from the original demo and initializing everything outside a ready block, getting it to work without images was basically a matter of getting rid of the preload callback:</p> <p><kbd><a href="http://jsfiddle.net/davidcl64/BXXAK/5/" rel="nofollow">Demo Fiddle</a></kbd></p> <p>Code:</p> <pre><code>$(function () { $('.services, .featured').appear({ once: true, forEachVisible: function (i, e) { console.log('adding delay: ' + i); $(e).data('delay', i); }, appear: function () { var delay = 150, stagger = 800, sequential_delay = stagger * parseInt($(this).data('delay'), 10) || 0; $(this).children().each(function (i, e) { $(e).trans(i * delay + sequential_delay + 'ms', '-delay'); }); $(this).removeClass('animationBegin'); } }); }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload