title: jQuery Best way to show list items one by one
body: <p>I would like to show list items one by one by clicking on a button.</p>
  
  <p><strong>Here is my code:</strong></p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $(document).ready(function() {
          $('ol &gt; li').hide();
          $('button').click(function() {
              if ($('ol &gt; li:first').is(':visible'))
                  $('ol &gt; li:visible:last').next().show();
              else
                  $('ol &gt; li:first').show();
          });
      });
  &lt;/script&gt;
  &lt;button type="button"&gt;Show&lt;/button&gt;
  &lt;ol&gt;
      &lt;li&gt;#1&lt;/li&gt;
      &lt;li&gt;#2&lt;/li&gt;
      &lt;li&gt;#3&lt;/li&gt;
      &lt;li&gt;#4&lt;/li&gt;
      &lt;li&gt;#5&lt;/li&gt;
      &lt;li&gt;#6&lt;/li&gt;
  &lt;/ol&gt;
  </code></pre>
  
  <p>It works but I am pretty sure that can be optimize. What would be the best way?</p>
  
  <p>Thanks in advance!</p>