2012-03-16, 05:45 AM
Hello,
In Mybb when you use Jquery, conflict issue arises e.g: Rich textbox, collapse and expand options in different listing pages stops working.
After facing a problem and finding a solution of jQuery and prototype conflict I am sharing the solution with you all.
By default, jQuery uses "$" as a shortcut for "jQuery". However, you can override that default by calling jQuery.noConflict() at any point after jQuery and the other library have both loaded. For example:
This will revert $ back to its original library. You'll still be able to use "jQuery" in the rest of your application.
If you are using any jQuery library that uses "$" as a shortcut for "jQuery" then you need to replace all "$" with "jQuery". This will solve your problem.
I hope this thread will be helpful for you .
Thanks
In Mybb when you use Jquery, conflict issue arises e.g: Rich textbox, collapse and expand options in different listing pages stops working.
After facing a problem and finding a solution of jQuery and prototype conflict I am sharing the solution with you all.
By default, jQuery uses "$" as a shortcut for "jQuery". However, you can override that default by calling jQuery.noConflict() at any point after jQuery and the other library have both loaded. For example:
<html>
<head>
<script src="prototype.js"></script>
<script src="jquery.js"></script>
<script>
jQuery.noConflict();
// Use jQuery via jQuery(...)
jQuery(document).ready(function(){
jQuery("div").hide();
});
// Use Prototype with $(...), etc.
$('someid').hide();
</script>
</head>
<body></body>
</html>
This will revert $ back to its original library. You'll still be able to use "jQuery" in the rest of your application.
If you are using any jQuery library that uses "$" as a shortcut for "jQuery" then you need to replace all "$" with "jQuery". This will solve your problem.
I hope this thread will be helpful for you .
Thanks