Created
January 15, 2014 05:45
-
-
Save Xordal/8431409 to your computer and use it in GitHub Desktop.
Multiple versions of jQuery on the 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
<script type='text/javascript' src='@Url.Content( "~/Scripts/jquery-1.5.1.js" )'></script> | |
<script type="text/javascript"> | |
$(selector).dosome(); // for use 1.5.1 jquery | |
</script> |
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
<!-- if we have layout with some jquery version --> | |
<script type="text/javascript" src='@Url.Content( "~/Scripts/jquery-1.6.4.js" )'></script> | |
<script type="text/javascript"> | |
// create this naming for Jquery 1.6.4 version | |
var $j6 = $.noConflict(true); | |
// for use 1.6.4 jquery: | |
$j6(selector).dosome(); | |
// for use default jquery version (1.5.1) | |
$(selector).dosome(); | |
</script> | |
<!-- |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| --> | |
<!-- we can include other version jquery after 1.6.4 (if we haven't layout) --> | |
<script type="text/javascript" src='@Url.Content( "~/Scripts/jquery-1.6.4.js" )'></script> | |
<script type="text/javascript"> | |
// create this naming for Jquery 1.6.4 version | |
var $j6 = $.noConflict(true); | |
</script> | |
<script type='text/javascript' src='@Url.Content( "~/Scripts/jquery-1.5.1.js" )'></script> | |
<script type="text/javascript"> | |
// for use 1.6.4 jquery: | |
$j6(selector).dosome(); | |
// for use default jquery version (1.5.1) | |
$(selector).dosome(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment