Using jQuery in Drupal 7

When using jQuery in Drupal 7 you need to include it in the following way. Unlike using jQuery in Drupal 6 you will notice that it needs to be enclosed within a 'function'. You don't need to include the document ready bit, I've just included that as an example of how you would.


Drupal version: 
Justin Chevallier

Justin Chevallier

Avid Drupal site builder & user for +10 years.

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.