繁体   English   中英

Drupal 7将jQuery文件添加到所有页面

[英]Drupal 7 Add jQuery File to all pages

我在这里查看了drupal的主页: https//drupal.org/node/171213 ,但我仍然收到错误。

在我的.info文件中,我添加了代码:

stylesheets[all][] = template.css
scripts[] = megamenu.js

我知道不需要样式表。 我只是把它放在那里,以便参考我的代码中的外观。

我检查了我的Google Chrome Web-Dev设置,它甚至没有加载.js页面,这让我相信我在.info文件中做错了。 有没有人对我哪里出错有任何想法?

谢谢!

根据我上面的评论,清除主题缓存可以解决问题。

$ form ['#adisted'] ['js'] = array(drupal_get_path('module','billing')。'/ billing.js'=> array('type'=>'file',));

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM