Calling function in custom function from 'outside'
<p>I've just asked this question (<a href="http://stackoverflow.com/questions/16353972/call-function-in-custom-function/16354057?noredirect=1#16354057">Call function in custom function</a>) to find out how to call a function within a custom function and it works great. I would like to use the <code>prepareSlide</code> function on my onClick in my HTML too however. How can i call the <code>prepareSlide</code> within this <code>itemSlider</code> function?</p>

<pre><code>jQuery('.item_holder').itemSlider();

$.fn.itemSlider = function (details) {
    var itemHolder = this;
    this.prepareSlide = function(slideNumber) {
        alert(1);
    }

    itemHolder.prepareSlide(1);
}
</code></pre>

<p>The <code>itemSlider</code> function adds pagination at the bottom of the slider with onClick to navigate to a certain slide right away(That's how it should work atleast) like so:</p>

<pre><code>&lt;a href="#" class="number" onclick="prepareSlide(1);" id="number_1"&gt;&amp;nbsp;&lt;/a&gt;
</code></pre>
