title: Start setInterval when button is clicked
body: <p>I am trying to start setInterval when user presses a button. Button id is #begin. I have tried various methods but then setInterval doesn't work at all. Any way to get this to work? Thanks!</p>
  
  <pre><code>     $(function () {
    count = 0;
    wordsArray = ["Text 1", "Text 2", "Text 3", "Text 4", "Text 5", "Text 6"];
    setInterval(function () {
      count++;
      $(".first").fadeOut(400, function () {
        $(this).text(wordsArray[count % wordsArray.length]).fadeIn(400);
      });
    }, 5000);
  });
  </code></pre>