title: Cycle 2 Next and Previous Button
body: <p>I have a cycle 2 js code that will change the chart every 15 seconds. However, how do I include a next/previous button so that user can click to any chart they want?</p>
  
  <p>HTML code</p>
  
  <pre><code>&lt;div id="chart1"&gt;
      &lt;div id="SummaryLineChart"&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="chart2"&gt;
      &lt;div id="DailyBarChart"&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="chart3"&gt;
      &lt;div id="PieChart"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My JS file:</p>
  
  <pre><code>jQuery(function () {
  var $els = $('div[id^=chart]'),
      i = 0,
      len = $els.length;
  
  $els.slice(1).hide();
  setInterval(function () {
      $els.eq(i).fadeOut(function () {
          i = (i + 1) % len
          $els.eq(i).fadeIn();
      })
  }, 15000)
  })
  </code></pre>