So if I wanted to use jTip on the same page as prototype would I change all the $ to jQuery in the jTip file or wrap it with the (function($) ... })(jQuery) ??
http://15daysofjquery.com/examples/jqueryTooltips/js/jtip2.js 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