By default, jQuery uses "$" as a shortcut for "jQuery"
jQuery provides the convenience by defining our own shortcut which eliminates the conflict.
A simple example
<script src="jquery.js"> </script>
<script src="prototype.js"> </script>
<script type="text/javascript" >
jQuery.noConflict() //now by default, $ is jQuery.
//But you can reassign it to your own variable.
var $jq = jQuery;
//start using $jq for jquery's $
$jq(document).ready(function() {
$jq("div").hide(); });
</script>
No comments:
Post a Comment