<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Done,
<h1> Ticket #1653</h1>
John Resig wrote:
<blockquote
cite="mid:
730bab940709171042g7e25851bseb7443c579ca2be1@mail.gmail.com"
type="cite">
<pre wrap="">After I sent this, I thought it over - it would be nice to standardize
on using the 'jQuery' variable name, at least to be consistent with
jQuery core. If you'd like to see this, feel free to file a bug for
UI.
--John
On 9/17/07, John Resig <a class="moz-txt-link-rfc2396E" href="mailto:jeresig@gmail.com"><
jeresig@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Right - that's what (function($){ ... })(jQuery); does. It brings
jQuery in to the local scope and redefines it as $. Having a UI
library use $ internally is acceptable as it won't conflict anything.
The mistake that's occurring here is that they pass in the global $
variable, when they should be passing in jQuery instead.
In my programs I use: (function(jQuery){ ... })(jQuery);, but that's
just my preference.
--John
On 9/17/07, John Farrar <a class="moz-txt-link-rfc2396E" href="mailto:sosensible@gmail.com"><
sosensible@gmail.com></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> John R.
I don't agree on that for the UI. It should be best practice that NO ONE
writting a plugin does it without using the jQuery() vs $() for external
calls. Intermally that is fine... but for the sake of stability we should
make that a "best practice", not required mind you. Only require it for
actual jQuery promoted libraries. In other words, if you want jQuery to
promote your library then you must connect to the external library though
the safe connector.
John Farrar
John Resig wrote:
Ah, yes - the should be using (function($){ ... })(jQuery); Could you
file a bug on this?
In general, it's best to call noConflict after you load your plugins,
but regardless, this is an easy fix.
--John