Invoking clearInterval for a Property Instance of an Initialized Custom jQuery Plugin
<p>I've written many js scripts &amp; jQuery plugins, so here's a condensed pseudo coded scenario of my dilemma.</p>

<p>Assume we have a well written jQuery plugin defining an a method object to pass into our plugin.</p>

<pre><code>// OUR HYPOTHETICAL jQUERY PLUGIN
(function($){

var methods = {
    init : function(options){
        var setup = $.extend({
            'speed' : 300,
            'msg' : 'blah'
        }, options)

        return this.each(function(){
            var animation = setInterval(function(){ ... },1000)
            ...
        })

    },
    stop : function(){
        window.clearInterval(animation); // DOES NOT WORK
    }
};

$.fn.somePlugin = function(method){
     // Method calling logic
        if ( methods[method] ) {
          return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
        } else if ( typeof method === 'object' || ! method ) {
          return methods.init.apply( this, arguments );
        } else {
            $.error( 'Bad Method...' );
        }   
};

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

<p>Let imagine instantiate this plugin to a div <code>$('#someDiv').somePlugin();</code></p>

<p>Everything up to this point works fine and I'm able to call... 
<code>$('#someDiv').somePlugin('stop');</code></p>

<p>However, the inside of the <strong>stop</strong> method is not able to figure out how to access the instance of the animation property that was created during the plugin initialization.</p>

<p>Any ideas on how to get that specific instance of the <strong>animation</strong> variable that's associated to the plugin binded to <strong>#someDiv</strong>.</p>
