title: Access function from the inside of an event in a jquery plugin
body: <p>I've made a plugin contains a click-event and a function:</p>
  
  <pre><code>// my function
  jQuery.fn.runSlideshow = function() {
  
    // in here I could write:
    jQuery(this).runSlideshow();
    // to call itself again
  });
  
  jQuery(this).find(".navigation-wrap a").click(function(ev){
    ev.preventDefault();
    // some code
  
  
    // in here, jQuery(this) points to the &lt;a&gt;-tag I clicked on
    alert(jQuery(this).html());
  
  
    // but now I want to call the function..
    jQuery(this).runSlideshow(); // won't work
    jQuery.fn.runSlideshow();  // won't work either
  
  })
  </code></pre>
  
  <p>I understand that it can't work right now because in the click event, I'm stuck to refer to the element I clicked on and can't go back to the "function-root". Any idea what to do with this?</p>