title: jquery store urls into an array and open them using .click(); function with controls
body: <p>My Exlanation of what I am trying to do, (tried explaining it in 2 ways to help you get an idea)</p>
  
  <p>example 1</p>
  
  <ol>
  <li>store all elements like so:  <code>&lt;a href="etc"&gt;url1&lt;/a&gt;</code> from inside <code>&lt;div class=".resources"&gt;&lt;/div&gt;</code> in an array, so that they could be clicked with  <code>click();</code>  function</li>
  <li>open first url from array with  <strong>default</strong>  button - i.e. <code>$(array[0]).click();</code></li>
  <li>open next url from array with   <strong>next</strong>   button - i.e. last clicked <code>$(array[+1]).click();</code></li>
  <li>open previous url from array with   <strong>prev</strong>   button - i.e. last clicked <code>$(array[-1]).click();</code></li>
  </ol>
  
  <p>example 2</p>
  
  <ol>
  <li>create an empty class in <strong>HTML</strong> like so: <code>&lt;div class="resources"&gt;&lt;/div&gt;</code></li>
  <li>create an array of URLs in <strong>JAVASCRIPT/JQUERY</strong> and store them within <strong>.resources</strong> class</li>
  <li>create  <strong>prev</strong> ,  <strong>default</strong> ,  <strong>next</strong>  buttons in <strong>HTML</strong></li>
  <li><strong>default</strong>  button when clicked opens first URL from array i.e.: <code>$(array[0]).click();</code></li>
  <li><strong>next</strong>  button when clicked opens next URL from array i.e.: <code>$(array[+1]).click();</code></li>
  <li><strong>prev</strong>  button when clicked opens previous URL from array i.e.: <code>$(array[-1]).click();</code></li>
  </ol>
  
  <p><strong>MUSTS:</strong>
  urls must be opened with: <code>click();</code> function: like so:  <code>$(array[0]).click();</code></p>
  
  <p><strong>fiddle</strong> to make it clearer: <a href="http://jsfiddle.net/6kred2yb/" rel="nofollow">view fiddle</a></p>