当前位置: 代码迷 >> Web前端 >> [原创] 让 jQuery 与 prototype 共处
  详细解决方案

[原创] 让 jQuery 与 prototype 共处

热度:285   发布时间:2012-08-22 09:50:34.0
[原创] 让 jQuery 与 prototype 共存
以下是我经常使用的,让 jQuery 与 prototype 共存的方法。
欢迎大家介绍下你经常使用的共存方法。

<script src="prototype.js"></script>
<script src="jquery.js"></script>
// 注意以上 JavaScript 的顺序

$.noConflict();

jQuery(document).ready(function($){
    // 这里出现的 $ 使用的是 jQuery 的 $。
});

// 这里出现的 $ 使用的是 prototype 的 $。
  相关解决方案