title: jQuery: run animation on text with timing
body: <p>I am trying to run the animation on two text lines which show the first text line for 5s and then other text line for 5s with the fadein and fadeout. which show the first line and the other and same for second. But at the first time this jQuery code show the the both line at the same time.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>setInterval(function() {  
    $('#move_text div:first')
      .fadeOut(800)
      .next()
      .fadeIn(800)
      .end()
      .appendTo('#move_text');
  }, 5000);
  $('#move_text').addClass('move_text');</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.move_text{
    position:relative;
    animation:move_Ist 5s infinite;
    -webkit-animation:move_Ist 5s infinite;
    -moz-animation:move_Ist 5s infinite;
  }
  
  @keyframes move_Ist {
    0% {
      left:-80%;  
    }
    
    25% {
      left:0%; 
    }
    
    75% {
      left:-3%; 
    }
    
    100% {
      left:105%; 
    }
  }
  
  @-webkit-keyframes move_Ist {
    0% {
      left:-80%; 
    }
    
    25% {
      left:0%; 
    }
    
    75% {
      left:-3%; 
    }
    
    100% {
      left:105%;
    }
  }
  
  @-moz-keyframes move_Ist {
    0% {
      left:-80%;
    }
    
    25% {
      left:0%;
    }
    
    75% {
      left:-3%; 
    }
    
    100% {
      left:105%; 
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="move_text"&gt;
    &lt;div id="text1"&gt;
      &lt;p1&gt;programming is my Passion&lt;/p1&gt;
    &lt;/div&gt;
    &lt;br&gt;
    &lt;div id="text2"&gt;
      &lt;p2&gt;i Love Technology&lt;/p2&gt;
    &lt;/div&gt; 
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>This code show both text line at the same time. I want tos how one and then the other.</p>