Skip to content

Instantly share code, notes, and snippets.

@alimd
Created July 25, 2013 13:43
Show Gist options
  • Save alimd/6079754 to your computer and use it in GitHub Desktop.
Save alimd/6079754 to your computer and use it in GitHub Desktop.
Use two jQuery version in one file !
<!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>
(function($){
$('#jq10').html("I'm jQuery "+$.fn.jquery);
})(jQuery10);
(function($){
$('#jq8').html("I'm jQuery "+$.fn.jquery);
})(jQuery8);
@alimd
Copy link
Author

alimd commented Jul 25, 2013

@alimd
Copy link
Author

alimd commented Jul 25, 2013

omid ghahrib aroom bigir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment