2

I was wondering if there is any recommended way of adding a Jquery plugin to Drupal 7 or it should be done by adding code to the main template file?

1

2 Answers 2

2

http://drupal.org/node/1043478#comment-4018128 explains how you can add it to your themes .info file.

If the plugin is only being used on certain pages of the site and not throughout, you might want to consider adding it only to those pages that need it via drupal_add_js for optimal performance.

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

Comments

1

You can add a Jquery plugin in main template file using script tags or specify the relevant file in .info and keep it in the local directory js of your theme

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.