jQuery plugin function call to its own method?
<p>I am using the following code below and essentially it takes an element as input (i.e.):</p>

<pre><code>$(#someDiv).Calculator();
</code></pre>

<p>but the problem is that I want to call this plugin's function within itself, but I don't know how to get an object/handle to itself to call the function.  caching off "this" does not have the proper reference.</p>

<pre><code>(function ($) {
    jQuery.fn.Calculator = function () {

        var selectedObjects = this;
        var control = $(selectedObjects[0])[0];

    $("#btnCalculate").click(function(){
        // this is where calculate needs to be called
        someObject.calculate(...);
    });

        return {
            calculate: function (value) {

                // do some code    
                return selectedObjects;
            }
        };
    }
})(jQuery);
</code></pre>

<p>Any ideas/direction would be of great help!  Thank you all!</p>
