jQuery is used by my CMS, and I don't really want to mess around below the hood of Drupal. Using noConflict would mean I'd have to change Drupal's js code that uses jQuery to use the new variable and I don't want to do that as it could cause errors if I don't do it perfectly, and when I upgrade the CMS the changes will just be overwritten.
I'm hoping to find a way to modify scriptaculous and prototype so that they behave as if they have their own noConflict mode, and that it was activated. Hope that's cleared things up. I wish it was that simple! On Jan 21, 11:37 pm, Tobie Langel <[email protected]> wrote: > Why don't you just use jQuery's noConflict mode ? > > On Jan 21, 11:28 pm, Phil W <[email protected]> wrote: > > > > > Thanks a lot for the response, I've gone through prototype.js, > > scriptaculous.js, builder.js, controls.js etc etc and replaced all > > instances of $ with _$. > > > I've uploaded to my server, but now when I click on a link with a > > onClick scroll event handler (using <a href="#" > > onclick="Effect.ScrollTo('restofhomepage'); return false;">read</a>) I > > get this error: > > > JavaScript -http://liverpoolstudentmedia.com/ > > Event thread: click > > Error: > > name: ReferenceError > > message: Statement on line 1: Undefined variable: Effect > > Backtrace: > > Line 1 of function script > > Effect.ScrollTo('restofhomepage'); return false; > > ... > > stacktrace: n/a; see 'opera:config#UserPrefs|Exceptions Have > > Stacktrace' > > > Any ideas what is going wrong? > > > Thanks, > > > Phil > > > On Jan 21, 5:16 pm, kangax <[email protected]> wrote: > > > > On Jan 21, 11:30 am, Phil W <[email protected]> wrote:> I suppose I > > > could use jQuery UI as it wouldn't clash, but I'd like to > > > > stick with Scriptaculous as the code can be in onClick etc events > > > > rather than all specified in the <head> region. > > > > [...] > > > > I'm pretty sure simply replacing all occurrences of `$` with, say `_ > > > $`, should work just fine. What exactly did you do last time and how > > > did it "break"? > > > > -- > > > kangax --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
