1

Here is the live page I am trying to implement on my Drupal website:

Working Page

This page works perfectly fine and uses the same versions of jQuery and jQueryUI that Drupal 7 uses.

Now when I put this content onto my Drupal site located here:

Drupal Page - Not working

jQueryUI seems to be not working. The jQuery Rotate is working fine however.

I've been searching for answers and implemented several methods, all of which have failed including the method of wrapping my jQuery in this code:

(function($) {

})(jQuery);

Any help as soon as possible would be amazing!

Michael Rader
  • 5,839
  • 8
  • 33
  • 43

2 Answers2

1

This is what you're doing (according what I see on your html code)

jQuery(document).ready(function($) {
...
})(jQuery);   

That is incorrect. Try with this

(function($) {
    $(function() {
    ...
    });
})(jQuery);   

Check this popular question in order to get more details about the correct syntax.

Community
  • 1
  • 1
Claudio Redi
  • 67,454
  • 15
  • 130
  • 155
  • That's giving me a syntax error in Dreamweaver and disables everything on my page now, including the jQuery Rotate. – Michael Rader Jun 08 '12 at 22:06
  • Oh I see, you forgot the first open bracket. But still, this did not fix the problem. Exact same results. – Michael Rader Jun 08 '12 at 22:08
  • @TommyCoffee: sorry, I missed a `{` after `(function($)`. Please try again – Claudio Redi Jun 08 '12 at 22:09
  • @Tommy Coffee: I easily found the problem I solved on my answer because it was generating a js error, unfortunately now we don't have any quick indicator of problems. I'd have to review all the code and unfortunately I don't have the time now. – Claudio Redi Jun 08 '12 at 22:27
0

The solution was pretty obscure. My code called for jquery 1.7 so that's what I had loaded up. On a hunch, I changed it back to Drupal's default jQuery 1.5 and it worked.

Michael Rader
  • 5,839
  • 8
  • 33
  • 43