How to add member function to a plugin?

How to add member function to a plugin?

I have developed my own selectable plugin. works fine.
I want to do something like jQueryUI sortable, But don't know how.

for example, after making some element sortable, you can call a serialize function to serialize them.
$("selector").sortable("serialize");

I want to develop that kind of member functions to my plugin too.
1. $("selector").selectable("functionName");
2. $("selector").functionName();   //this is even better

I can't find the syntax or example on how to develop this feature.
Please tell me if you know how its done.