There isn't a reason to include this behavior. Why should we enforce a
singleton instance while we actually support having many instances of
jQuery around. Each with their own event handlers, animations, etc.

--
Ariel Flesler
http://flesler.blogspot.com

On Dec 4, 8:19 pm, aakoch <[EMAIL PROTECTED]> wrote:
> Is there a reason for this behavior? It seems like this is a jQuery
> bug to me.
>
> On Dec 4, 4:10 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
>
> > Well, if you include a new copy of jQuery then it'll overwrite the old
> > copy. You can bring the old copy back by using jQuery.noConflict - or
> > you could just not include jQuery twice.
>
> > --John
>
> > On Thu, Dec 4, 2008 at 4:30 PM, aakoch <[EMAIL PROTECTED]> wrote:
>
> > > My co-worker and I found a bug/feature and wanted to get some feedback
> > > as to the thought behind this "feature".
>
> > > Situation: On a single page I'm using jQuery via the script tag, then
> > > I add a custom function, and finally I call jQuery again via the
> > > script tag. When I try to run my custom function, it's gone! It seems
> > > that although jQuery will try to use any previously created jQuery
> > > object, jQuery.fn is overwritten every time.
>
> > > // don't recreate jQuery
> > > var jQuery = window.jQuery = window.$ = function( selector, context )
> > > { ...
> > > ...
> > > // but always overwrite the functions?
> > > jQuery.fn = jQuery.prototype = {...
> > > ...
>
> > > Is there a reason that jQuery.fn is being overwritten?
>
> > > Thanks,
> > > Adam
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to