title: jquery plugin: multiple call to a function, passing different parameters
body: <p>I've got a tricky problem.</p>
  
  <p>I've made a jquery Widget plugin : </p>
  
  <pre><code>$.fn.Widget=function(id_place,id_event,options){};
  </code></pre>
  
  <p>I call it once when the page is ready : (specifying that I want a last sorting)</p>
  
  <pre><code>$(document).ready(function() {
      $('#mydiv').Widget(13,50,{"sort":"last"});
  
  });
  </code></pre>
  
  <p>But in this plugin, I generate a little menu bar, with 3 links to change the sorting of my elements : "last" (initial call); "top" (most popular) and "answered" (with answers)</p>
  
  <p>My question is : how to, in this generated code inside my plugin, Sort PopularSort LastSort answered,  change the sorting of my Widget??</p>
  
  <p>Can I call <code>Widget(13,50,{"sort":"top"})</code> inside of it, Or can I use a inside function like <code>change_sorting(top)</code>??</p>
  
  <p>Thx a lot for your time and your help</p>
  
  <p>EDIT: Thanks for your answers: I've added these lines in my plugin:</p>
  
  <pre><code>var object = $(this);
      $(".sort_last").click(function(){ object.Widget(13,50,{"sort":"last"}); });
      $(".sort_top").click(function(){ object.Widget(13,50,{"sort":"top"}); });
      $(".sort_answered").click(function(){ object.Widget(13,50,{"sort":ansered"}); });
  </code></pre>