Coming from mootools (jQuery class question)

Coming from mootools (jQuery class question)

Hi,

I usually use mootools but due to the popularity of jQuery i've decided to teach myself it.  I created some classes in mootools and i wanted to make the same in jQuery but i'm finding it really hard to understand and was hoping someone could help with a few basics. 

So in mootools i've made a slider where you pass a .wrapper and a .store, and then the class builds a slider inside the wrapper with each slide being composed of items within the store div. I can pass other options such as navigation etc.

example:
  1. var slider = new Slider(document.getElement('.slider'), { x: 1018, y: 400 }, { 
  2. store : document.getElement('.store'), 
  3. auto : true,
  4. duration : 1000,
  5. delay : 5000
  6. });
i think i understand how to do this in jQuery but what i'm having a little difficulty getting my head around is referencing this "Slider" again.

so for example if i wanted to pause on an action (say a click on a link) i would do this in mootools

  1. document.getElement('a').addEvent('click', function(e){
  2.    slider.pause();
  3. });


and then later on i also want to pause on completion of hiding the gallery (say to switch between a thumbnail view and slider view)

  1. var hideSlider = new Fx.Morph('slider', { onComplete :function(){ slider.pause(); } });

i don't understand how i accomplish the same in jQuery.  It seems to me you have to pass it all your handlers on creation and "attached" it to the element and then handle all that inside the code.  

  1. $('.slider').slider({
       //options etc here
    });


Is this right? Seems a bit limited unless i'm being dumb (which is more than likely haha);

Thanks