jQuery.noConflict();
jQuery(document).ready(function($){
});
$.noConflict();
<html>
<head>
<script src="/ajax/libs/prototype/1.7.2.0/prototype.js"></script>
<script src="/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
var j = $.noConflict();
j(document).ready(function(){
j("#b1").click(function(){
alert("jQuery is working fine");
});
});
document.observe("dom:loaded", function(){
$("b2").observe("click", function(event){
alert("Prototype is working fine");
});
});
</script>
</head>
<body style = "text-align: center;">
<h4> It is an example of using the jQuery noConflict() method. </h4>
<p> Click the following buttons to see the effect. </p>
<button id = "b1"> Run jQuery </button>
<button id = "b2"> Run Prototype </button>
</body>
</html>
<html>
<head>
<script src="/ajax/libs/prototype/1.7.2.0/prototype.js"></script>
<script src="/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
jQuery.noConflict();
jQuery(document).ready(function($){
$("#b1").click(function(){
alert("jQuery is working fine");
});
});
document.observe("dom:loaded", function(){
$("b2").observe("click", function(event){
alert("Prototype is working fine");
});
});
</script>
</head>
<body style = "text-align: center;">
<h4> It is an example of using the jQuery noConflict() method. </h4>
<p> Click the following buttons to see the effect. </p>
<button id = "b1"> Run jQuery </button>
<button id = "b2"> Run Prototype </button>
</body>
</html>