The following jQuery plugin has an API where you can add your own methods.
Here is a simple example.
In the example on that page, how would I call the function your_method?
They don’t show this. All I want to do is put a button on the page and then when that button is clicked, trigger off my own custom method.
you create an init method in which you can create a button on a toolbar and bind your custom plugin method to it:
hope it helps