[jQuery] Re: jQuery prototype magic

2008-09-17 Thread Balazs Endresz
In other words 'new jQuery.fn.init( selector, context )' doesn't return a new jQuery object but a new 'init' object. But the init object doesn't have any methods, of course, so the ones of jQuery have to be copied over. So you couldn't access the methods because 'init' didn't have them before. (It

[jQuery] Re: jQuery prototype magic

2008-09-17 Thread Andrei Maxim
On Sep 17, 2008, at 10:14 AM, Michael Geary wrote: > jQuery.fn is one of those things that exists mainly for historical > reasons. > > In the very first versions of jQuery, $.fn was *not* the same as > $.prototype. (There was no jQuery object by that name in those days, > just a > $ object.)

[jQuery] Re: jQuery prototype magic

2008-09-17 Thread Michael Geary
jQuery.fn is one of those things that exists mainly for historical reasons. In the very first versions of jQuery, $.fn was *not* the same as $.prototype. (There was no jQuery object by that name in those days, just a $ object.) $.prototype wasn't used for anything; instead, every time a jQuery o

[jQuery] Re: jQuery prototype magic

2008-09-16 Thread Alex Weber
Just a bump here since I'm curious too! :) I just kind if take things like jQuery for granted and use and abuse them without really knowing or caring how it does what it does, so long as it works :) (I guess that's a textbook OOP abstraction definition lol) Anyway, wanna know the answer too if any