I have a javascript variable which is referencing a complex object (it is a slideshow control but that's not important)
e.g.
var slideshow = new SlideShow();
Because i have multiple slideshows on the page and I want to make accessing certain operations generic/reuse code in different pages.
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.
So instead of
slideshow.playSlides();
do something like
[dynamically get reference to variable containing slideshow].playSlides();
I've looked into this before in JavaScript and not found a solution, I'm wondering if this can be done in JQUERY somehow?