When you have other libraries together with jQuery you can use the jQuery.noConflict()
function to avoid the conflicts with the common symbols like the $
Sample from jQuery page and how you use the noConflict()
:
<script type="text/javascript" src="other_lib.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$.noConflict();
jQuery(document).ready(function($) {
// Code that uses jQuery's $ can follow here.
});
// Code that uses other library's $ can follow here.
</script>
The idea is that after you call the $.noConflict();
then all rest call to jQuery libraries are done using the jQuery
and not the $
symbol as on the example above.