drupal jQuery 1.4 on specific pages

2019-08-08 20:17发布

jQuery 1.4 breaks various modules and is not ready to replace 1.3.2 wholesale. But on various pages with complex javascript interactions, I need 1.4.

What's a good way to force drupal to use 1.4 on specific pages?

Thanks.

标签: jquery drupal
3条回答
你好瞎i
2楼-- · 2019-08-08 20:32

Is it possible to edit templates? Or how about create a script that includes jQuery based on the page. Like if your body has the class 1.3.2, then it includes the old version, or if it has the class 1.4 it includes the new one.

查看更多
Rolldiameter
3楼-- · 2019-08-08 20:35

jquery_update is a great way to get 1.3.2 (up from 1.2.6) on D6. You can then combine this with context to serve a different version on certain pages.

查看更多
Rolldiameter
4楼-- · 2019-08-08 20:49

Take a look at this post, the author describes replacing a js file using hook_theme_registry_alter and a preprocess function. http://www.mediacurrent.com/blogs/remove-or-replace-jscss-page

查看更多
登录 后发表回答