[Doubt] jQuery Plugin

[Doubt] jQuery Plugin

Hi guys,
I'm trying to make a jQuey plugin with my own methods, something like this:

  1. var myPlugin = new MyPlugin(paramA, {"foo": "bar", "foo2": "bar"});

  2. myPlugin.doThis();

  3. myPlugin.doThat();


I don't know how could I make this kind of plugin. I don't know how can I start.
Can you let me a little sample with a little explanation?

Thanks!