I have a website using a "widget" (from http://healcode.com ) that includes the script.aculo.us JavaScript library. The problem is that the site I'm building is on WordPress, so there is a classic jQuery vs script.aculo.us conflict.
I know that I need to run jQuery in .noConflict() mode, but I have to get the syntax wrong. When I assign $ jQuery .noConflict as follows, it still disables the script.aculo.us functions:
var $ = jQuery.noConflict(); $(document).ready(function () {
I know that I assign $ to jQuery in .noConflict() mode, and I assume that script.aculo.us (which is loaded through the widget in the main body, therefore AFTER jQuery) is trying to re-assign $ back to script.aculo.us.
How to assign $ jQuery so that the later loaded script.aculo.us library does not conflict? I already tried the following without any success (the following code causes script.aculo.us to work, but jQuery does not work):
jQuery(document).ready(function () {
EDIT
Debug console output for the above code:
Uncaught TypeError: Object #<HTMLDocument> has no method 'ready' (anonymous function) , so document.ready fails because it is assigned to jQuery, which somehow does not load properly ...
EDIT 2
Both of the 2 (at the time of the update) answers posted below do nothing to solve the problem I'm struggling with. They may be technically correct, but they do not affect my problem.
Brian source share