Jump to content

JQuery and Mootools


Recommended Posts

Hi Folks,

 

We're in the process of upgrading to WHMCS 4 which now includes JQuery. For our integration, this poses some problems since we use Mootools. From what I have read, they share the same function names and namespaces so they're largely incompatible. A few things break on our site once we activate JQuery. Load order seems to favor whichever comes second. JQuery loaded first, then Mootools reliant items work but not JQuery. Vice versa, the reverse is true.

 

Anyway, curious if anyone else has tackled this with their integration that may have any tips or insight?

 

Thank you for your time.

Link to comment
Share on other sites

I've had some success with jQuery.noConflict(). Specifically the $j = jQuery.noConflict(). Unfortunately, renaming the functions inside the pwstrength.js doesn't work. But I have had success moving its contents into the .tpl and then renaming the $ functions to $j(). Have only tested with the password checking code. May drop back by here and update this thread after the integration-upgrade is complete. I'm certainly no Java Guy, nor a Mootools / JQuery type for that matter. Feel free to set me straight on any of the above... Really not sure why simply renaming the $() functions inside a linked JS file didn't work (but moving the code into the TPL did...)

 

More Information on JQuery.noConflict()

http://docs.jquery.com/Using_jQuery_with_Other_Libraries and http://docs.jquery.com/Core/jQuery.noConflict

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated