Skip to content

Instantly share code, notes, and snippets.

@etoxin
Created August 12, 2014 04:49
Show Gist options
  • Save etoxin/89edbf36f79691ab5026 to your computer and use it in GitHub Desktop.
Save etoxin/89edbf36f79691ab5026 to your computer and use it in GitHub Desktop.
run multiple jQuery instances.
<!DOCTYPE html>
<html>
<head>
<title></title>
<!-- load jQuery 1.11.1 -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
var jQuery_1_11_1 = $.noConflict(true);
</script>
<!-- load jQuery 1.4.2 -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
/**
* We define jQuery in no conflict mode
*/
var jQuery_1_4_2 = $.noConflict(true);
/**
* we then wrap the entire tracking script in a self executing function and provide it with jquery 1.4.2
*/
(function($){
/**
* we now have access to jquery 1.4.2 within this scope
* we then define all the js from toyota.com.au here.
*/
})(jQuery_1_4_2);
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment