Putting jQuery Into No-Conflict Mode

<!-- Putting jQuery into no-conflict mode. -->
<script src="prototype.js"></script>
<script src="jquery.js"></script>
<script>
var $myname = jQuery.noConflict();
// $myname is now an alias to the jQuery function; creating the new alias is optional.
$myname(document).ready(function() {
$myname( "div" ).hide();
});
/* The $ variable now has the prototype meaning, which is a shortcut for document.getElementById(). */
</script>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: