On 6/20/07, Jörn Zaefferer <[EMAIL PROTECTED]> wrote:


Jonathan Sharp wrote:
> I have the following:
>
> $('<div class="foo">').find('.foo').doSomething();
Why not simply this?


Well, the actual implementation is a little more complex. But basically it
can be expanded to:

$('<div class="foo"></div><div class="bar"></div>').foo().bar();

$.fn.foo = function() {
   return this.find('.foo').each(function() {
       ...
   };
};
$.fn.bar = ...etc.

-js

Reply via email to