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, 2013 at 22:41
  • yes i want to run my code in node edit form, but it's not working Mar 4, 2013 at 23:14

1 Answer 1


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.

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

Your Answer

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

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