title: Javascript / JQUery Dynamic Variable Access
body: <p>I have a javascript variable which is referencing a complex object (it is a slideshow control but that's not important)</p>
  
  <pre><code>e.g.
  var slideshow = new SlideShow();
  </code></pre>
  
  <p>Because i have multiple slideshows on the page and I want to make accessing certain operations generic/reuse code in different pages. </p>
  
  <p>I WANT TO BE ABLE TO ACCESS DIFFERENT VARIABLES CONTAINING DIFFERENT INSTANCES OF THE SLIDESHOWS IN THE SAME JAVASCRIPT ROUTINE. THE VARIABLE USED IS DIFFERENT DEPENDING ON WHAT SLIDESHOW IS BEING CONTROLLED AT THE TIME.</p>
  
  <p>So instead of </p>
  
  <pre><code>slideshow.playSlides();
  </code></pre>
  
  <p>do something like</p>
  
  <pre><code>[dynamically get reference to variable containing slideshow].playSlides();
  </code></pre>
  
  <p>I've looked into this before in JavaScript and not found a solution, I'm wondering if this can be done in JQUERY somehow?</p>