return object from plugin

return object from plugin

How do you design a plugin such that it returns an object after initialization? 

  1. var myObj = $("selector").myPluging();
  2. // do something with myObj