var $j = jQuery.noConflict();
以后凡是jquery用$函数的地方通通替换为$j, 例如:
$(function() {
….
});
替换成:
$j(function() {
….
});
方法一:
|
方法二:
|
方法三:
<html>
<head>
<script src="Mootools.js"></script>
<script src="jquery.js"></script>
<script>
jQuery.noConflict();
// Put all your code in your document ready area
jQuery(document).ready(function($){
// Do jQuery stuff using $
$("div").hide();
});
// Use Prototype with $(...), etc.
$('someid').style.display = 'none';
</script>
</head>
<body></body>
</html>