0%

[原创] 让 jQuery 与 prototype 共存

以下是我经常使用的,让 jQuery 与 prototype 共存的方法。
欢迎大家介绍下你经常使用的共存方法。

1
2
3
4
5
6
7
8
<script src="prototype.js"></script>
<script src="jquery.js"></script>
// 注意以上 JavaScript 的顺序
$.noConflict();
jQuery(document).ready(function($){
// 这里出现的 $ 使用的是 jQuery 的 $。
});
// 这里出现的 $ 使用的是 prototype 的 $。
坚持原创及高品质技术分享,您的支持将鼓励我继续创作!