I need to run jquery code in my content type form so i added jquery-1.8.0.min.js file in info file of my theme.

after clear all caches something wrong happened, the "add more" button on date field stop working, i'm sure it's from adding the js file.

Any suggestion?

  • I'm not sure I understand the problem. Do you want to add your own inline jQuery code (and not jQuery itself) inside the edit node page? – Pere Mar 4 '13 at 22:41
  • yes i want to run my code in node edit form, but it's not working – abd Mar 4 '13 at 23:14

Drupal already includes jQuery. You should not add another jQuery library because this can cause conflicts with the existing one.

I suggest you to use jQuery Update if you want to use another version of jQuery.

If what you want is to run your own javascript code, you could add it using drupal_add_js().

Hint: Try first with alert('hello world'). See Working with JavaScript and jQuery.

| improve this answer | |
  • my jquery code does not execute inside drupal code – abd Mar 4 '13 at 22:37
  • i'm so sory drupal core (drupal website) – abd Mar 4 '13 at 23:13
  • Ok, see updated answer. And please read the documentation :) – Pere Mar 4 '13 at 23:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.