jQuery extension (scope?) question
<p>I have some confusion over a jQuery extension not working as I'd expect. I have the following function defined:</p>

<pre><code>$.fn.poster = function() {
    this.each(function() {
        self = $(this);
        self.click(function() {
            /* does stuff */
            $.post(url, data, function(d, t) { handle_storage(d, t, self); }, "json");
        });
    });
}

handle_storage = function(storages, status, caller) {
    container = $("&lt;div&gt;");
    $("&lt;span&gt;").poster().html(storage.name).appendTo($("&lt;li&gt;").addClass("folder").appendTo(container));
}

$(function() {
    $("li.storage span").poster();
});
</code></pre>

<p>The initial call to poster() in the ready function works, but inside the handle_storage() callback, I get a "poster() is undefined" error. What gives?</p>
