Hi Mike,

Thanks for your reply. Currently I'm using "jQuery" instead of "$" in
all my code. If I continue like that and ensure any plugins also use
jQuery instead of "$" or use the method you describe, that should be
enough, right?  BTW, has interface been rewritten to use this method?

Thanks,
Kelly


On Apr 23, 11:43 am, "Mike Alsup" <[EMAIL PROTECTED]> wrote:
> Kelly,
>
> I assume that "your code" is jQuery based.  The easiest approach is to
> simply scope your code like this:
>
> (function($) {
>
>     // your code here
>
> })(jQuery);
>
> This lets you write in typical jQuery style (using the $ symbol)
> without worrying about collisions with other libraries.  Most jQuery
> plugins have been refactored to use this approach.  However, as I
> pointed our earlier, some older plugins still assume that $ == jQuery.
>  Thickbox is an older plugin that is known to rely on $ but Klaus
> Hartl is currently rewritting it and a new and improved version will
> be available soon(ish).
>
> Mike
>
> On 4/23/07, kerford <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'd like to piggyback on this thread if I could. I'm writing for an
> > environment that may or may not have other libraries included in the
> > page. It's not something I can know beforehand. I also won't know in
> > what order libraries (if any) are loaded. What is the best, most
> > defensive approach to take for this kind of environment?
>
> > Thanks,
> > Kelly

Reply via email to