jQuery extension: why does it not work on all matching elements?
<p>I have an extension going like:</p>

<pre><code>$.fn.crazything = function() {
    var self = $(this);
    // do some crazy stuff
    return self;
}
</code></pre>

<p>And when I call it like:</p>

<pre><code>$("div.crazydiv").crazything();
</code></pre>

<p>It works, but only on the first matching div. If I have more than one div on the page, I need to do:</p>

<pre><code>$("div.crazydiv").each(function(i) { $(this).crazything (); });
</code></pre>

<p>Why is this, and how can I rewrite my extension to work on multiple divs?</p>
