Created
July 25, 2013 13:43
-
-
Save alimd/6079754 to your computer and use it in GitHub Desktop.
Use two jQuery version in one file !
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script> | |
jQuery10 = jQuery; | |
$.noConflict(); // remove $ | |
</script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script> | |
<script> | |
jQuery8 = jQuery; | |
</script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div id="jq10"></div> | |
<div id="jq8"></div> | |
</body> | |
</html> |
This file contains hidden or 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
(function($){ | |
$('#jq10').html("I'm jQuery "+$.fn.jquery); | |
})(jQuery10); | |
(function($){ | |
$('#jq8').html("I'm jQuery "+$.fn.jquery); | |
})(jQuery8); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Live : http://jsbin.com/oronic/1/edit