title: JavaScript if Statement
body: <p>I'm creating an if statement that fires different functions. Is there a better way I can accomplish this functionality?</p>
  
  <pre><code>$("#slide01-bttn").click(function() {
  
      if ($("#slide-1").is('#featured_ul li:nth-child(1)'))
      {
      alert("First Child");
      moveSlideFirstChild();
      }
  
      if ($("#slide-1").is('#featured_ul li:nth-child(2)'))
      {
      alert("Second Child");
      moveSlideSecondChild();
      }
  
      if ($("#slide-1").is('#featured_ul li:nth-child(3)'))
      {
      alert("Third Child");
      moveSlideThirdChild();
      }
  
      if ($("#slide-1").is('#featured_ul li:nth-child(4)'))
      {
      alert("Fourth Child");
      moveSlideFourthChild();
      }
  });
  </code></pre>