edit this page - page history - about editing

Multiple JQuery versions with EmberJS

To load different versions of JQuery on a page while still letting EmberJS load (which requires JQuery 1.9+), based on this jsfiddle:

<!-- load modern JQuery -->
<script src="jquery-1.11.1.js"></script>

<!-- configure Ember to use it, and load Ember -->
<script>
    Ember = { imports: { jQuery: jQuery.noConflict(true) } };
</script>
<script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
<script src="http://builds.emberjs.com/ember-latest.js"></script>
<script src="http://builds.emberjs.com/ember-data-latest.js"></script>

<!-- and then reload JQuery -->
<script src="jquery-1.6.2.js"></script>

Multiple JQuery versions in bower.json


You can simply specify two versions like so in your bower.json file:

{
  "dependencies": {
    "jquery": "~1.11",
    "jquery-1.6.2": "jquery#1.6.2",
  // ...

Categories: Javascript | EmberJS
edit this page - what links to here? - page history - top
Last edited by jevon jevon 34 months ago