Handle events in a jQuery plugin
<p>I'm writing a jQuery plugin but I'm stuck when I'm handling events.</p>

<p>For example I want the user to be able to specify a function to handle my save event</p>

<p>He would configure it like this</p>

<pre><code>$(".foo").bar({
  save: function (x,y){
     alert("whatever");
  })
});
</code></pre>

<p>But I dont know how to call that from my plugin and how to pass arguments...</p>

<p>thanks for reading !</p>
