Can a setInterval function stop itself?
<p>I have a <a href="http://jsfiddle.net/jzaun/ZjY7k/" rel="nofollow">jsFiddle</a> up with an example to work from. </p>

<pre><code>$().ready(function() {
    $('.test').each(function() {
        $this = $(this);
        $this.data('Worker', function() {
            $('#stop').html((parseInt($('#stop').html()) + 1))
        })
        setInterval($this.data('Worker'), 100);
    });

    $('#stop').click(function() {
        // I want the worker function to stop being triggered here
        $('.test').remove();
    });
});
</code></pre>

<p>What I would like to do is attach a worker function to an element in the DOM so that when the element is removed, the worker function stops.</p>

<p>Is something like this possible?</p>
