1

I am having trouble getting a Jqery script to work on my first drupal 7 site. I have everything working locally outside of drupal so I know the script works. I included the script in the .info file and it shows up on the page in firebug. For some reason the script won't read. I do have document.ready included, jquery is installed on the site. What else could be the problem? Is there something about drupal and how it handles script file I don't know about?

Thanks for the help all.

1

2 Answers 2

2

I had the same problem: try to use

jQuery("something")...

instead of

$("something")...

I have fixed my problem with this.

Sign up to request clarification or add additional context in comments.

3 Comments

try to use the firebug console something with jQuery: does it work? Without any code it's hard to help you.
Well I did swap out the $ with jquery. What are you suggesting I do? The script runs on page load so any changes in FB wouldn't update anyway... i don't think.
My bad you all were right. I didn't capitalize the Q in jQuery.
2

This would be easier:

(function ($) {
  $(document).ready(function(){
    // javascript here
  });
})(jQuery);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.