title: Continuously loop through JavaScript text array onclick
body: <p>I have a text array. I want to display the first entry on page load. And then replace the text with the next entry when I click a button. If I keep clicking the button I want the text to continuously be replaced by waht is next in the array, and when it gets to the end start back at the first entry. Can someone please show me an example code for that. I am new to this.</p>
  
  <p>Here's what I have</p>
  
  <pre><code>$(document).ready(function(){
    var arr = new Array("One","Two","Three");
    var len=arr.length;
    $('#next').click(function(){ 
      for(var i=0; i&lt;len; i++) { 
        $('#quote').html(arr[i]); 
      } 
   });
  });
  </code></pre>