How to call inner function in jQuery?
<p>I'm learning jQuery and saw this chunk of code.</p>

<p>myJqueryFile.js</p>

<pre><code>(function($, undefined) {

    function Calendar(element, options, eventSources) {
        var t = this;
        t.incrementDate = incrementDate;

        ....some code here

        function incrementDate(years) {
            if (years !== undefined) {
                addYears(date, years);
            }

            renderView();
        }
    }
})(jQuery);
</code></pre>

<p>In my html, I am referencing the js above externally and want to call incrementDate() but I'm keep getting "increment is not function".</p>

<p>But I think incrementDate() is not private function so I should be able to call it from outside. Is it really possible?</p>

<p>I'm calling incrementDate like below:</p>

<pre><code>&lt;a href="" onclick="incrementDate();" /&gt;
</code></pre>

<p>Oops, I totally missed the surrounding jQuery bracket!</p>
