drupal jQuery 1.4 on specific pages

萝らか妹 提交于 2020-01-16 00:40:50

问题


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.


回答1:


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




回答2:


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.




回答3:


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.



来源:https://stackoverflow.com/questions/2842792/drupal-jquery-1-4-on-specific-pages

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!