1

In my theme Basic, I'm loading 2 jquery files. Both two are loaded at front page, but only first loaded run. If I change loading order, again only first file do anything. Here are the examples:

1) Drupal.behaviors.basic = { ...some jquery stuff...

2) Drupal.behaviors.basic = { ...some other jquery stuff...

  • Hi @Pierre.Vriens, I'm sorry... I have not a copy of the linked files... Just editing the question, a really rockie question... Fell free to ask me for deleting it, if you think it is not very useful... I haven't done if because I think the answer could be useful for someone over there... – calbasi Mar 19 '18 at 21:58
2

They both have the same name, both "basic". Rename one of the 2 and you should be fine. Change

Drupal.behaviors.basic = {

To for example

Drupal.behaviors.modifications = {

The name should be something descriptive about what the underlying functions do.

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.