Created
November 16, 2010 15:59
-
-
Save getify/701970 to your computer and use it in GitHub Desktop.
how to use jQuery.noConflict() to manage multiple versions of jQuery on same page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="jquery-1.3.3"></script> | |
<script>var $jq133 = jQuery.noConflict(true);</script> | |
<!-- other stuff --> | |
<script src="jquery-1.4"></script> | |
<script>var $jq14 = jQuery.noConflict(true);</script> | |
<!-- other stuff --> | |
<script src="jquery-1.4.3"></script> | |
<script>var $jq143 = jQuery.noConflict(true);</script> | |
<!-- other stuff --> | |
<script> | |
$jq14; // ... | |
$jq143; // ... | |
$jq133; // ... | |
</script> | |
</head> | |
<body></body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@santosh-k1 see the jquery docs here. in the particular page (that you control):
Now, the
jQuery
and$
versions should all be the older one from the master page, and the current page should be able to use the latest jQuery from whatever variable name you chose like$jqLatest
.