Note that there are some explanatory texts on larger screens.

plurals
  1. POOn page load, fading in and out one div after another with jQuery
    text
    copied!<p>I am working on a piece of my personal website and what I want to do is a simple animation.</p> <p>Here is the code:</p> <pre><code>&lt;div class="wrapper"&gt;--- Main website body ---&lt;/div&gt; &lt;div class="intro1"&gt; &lt;div class="name1"&gt;John&lt;/div&gt; &lt;div class="name2"&gt;Doe&lt;/div&gt; &lt;/div&gt; &lt;div class="intro2"&gt; &lt;div class="prof1"&gt;Designer&lt;/div&gt; &lt;div class="prof2"&gt;Developer&lt;/div&gt; &lt;/div&gt;​ &lt;style&gt; body {background: rgba(0,0,0,1); margin: 0px; padding: 0px; color: rgba(255,255,255,1); } .wrapper {width:100%; height:100%; max-height: 100%; background: rgba(0,0,0,1); display: none;} .intro1 {width: 500px; height: 150px; margin: 40% auto 0% auto; padding: 0px; display: none;} .intro2 {width: 500px; height: 150px; margin: 40% auto 0% auto; padding: 0px; display: none;} &lt;/style&gt; $(function() { $('.intro1').fadeIn(1000).fadeOut(1000); $(function() { $('.intro2').fadeIn(1000).fadeOut(1000); }); });​ </code></pre> <p>Here is the break down of what should happen:</p> <ol> <li>Page loads with simple black background</li> <li>Div (.intro1) slowly fades in with possible sliding in from the top and going downwards</li> <li>Div (.intro1) slowly fades out with possible sliding out downwards followed by removing the element completely </li> <li>Div (.intro2) slowly fades in with possible sliding in from the top and going downwards</li> <li>Div (.intro2) slowly fades out with possible sliding out downwards followed by removing the element completely </li> <li>Div (.wrapper) slowly fades in</li> </ol> <p>This is what I have so far and I am nor sure what I need to do next.</p> <p>Here is the link: <a href="http://jsfiddle.net/gVp7m/" rel="nofollow">http://jsfiddle.net/gVp7m/</a></p>
 

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