我的项目中有多个 jquery 文件。我正在使用jquery1.4.2使用facebox,但我也需要原型和scriptacolous脚本。我用过 jQuery.noconflict();在我的代码中,但它不起作用。
这是网址http://mlep.com/~avalon/wordpress/ideas-and-insights/case-studies/ http://mlep.com/~avalon/wordpress/ideas-and-insights/case-studies/.
应该是这样的安排,
- 加载其他库和其他非 jQuery 脚本
- 加载 jQuery 库。
- 调用 jQuery.noConflict。
- 加载 jQuery 插件
- 其他 jQuery 的东西或代码..
像这样的代码,
<script type="text/javascript" src="http://mlep.com/~avalon/wordpress/wp-content/themes/twentyten/facebox/jquery14.js"></script>
<script type="text/javascript">
var ang = jQuery.noConflict();
</script>
<script type="text/javascript" src="http://mlep.com/~avalon/wordpress/wp-content/themes/twentyten/facebox/facebox.js"></script>
<script type="text/javascript">
// other jQuery Codes here...
</script>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)