jQuery with other libraries

Submitted by:David Villa

Date added:26 November, 2011

Category:jQuery

In jQuery $ is an alias for jQuery, so you can use jQuery() for accessing the jQuery methods. The following code example shows how you can use other libraries with jQuery:

Tags: libraries

Code Snippet:

<html>
<head><title>jQuery Example</title>
<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<script>
jQuery.noConflict(); //For using other libraries
// Use jQuery using function jQuery(...)
jQuery(document).ready(function(){
//write your code here
});
// Use Prototype with $(...), etc.
$('messagebox').hide();
</script>
</head>
<body><div id="messagebox"></div></body>
</html>
 
 

Comments