Hi,

I'm trying to write my first plugin and so far have managed to get it working fine including passing options in.

What I can't seem to find out is how to create plugin methods eg,

Using jQuery UI Draggable, passing an option in:


        $('.selector').draggable({

                opacity: 0.35

        });


So this would make the selector draggable with 0.35 opacity.


However, UI Draggable also has the 'disable' method:


        $('.selector').draggable('disable');


Which disables the draggable functionality - this is essentially what I'm after.

ie,


        $('.selector').myplugin('somemethod');



Can anyone please advise/point me in the right direction of how to do this?

Thanks,



djl

Reply via email to