Skip to content

Instantly share code, notes, and snippets.

@rguerrettaz
Created March 10, 2014 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rguerrettaz/9468884 to your computer and use it in GitHub Desktop.
Save rguerrettaz/9468884 to your computer and use it in GitHub Desktop.
Use newest version of jQuery in Crowdflower job
require(['jquery-noconflict', 'bootstrap-modal', 'bootstrap-tooltip', 'bootstrap-popover', 'bootstrap-tab', 'jquery-cookie'], function (_, modal, jQuery) {
//Ensure MooTools is where it must be
Window.implement('$', function (el, nc) {
return document.id(el, nc, this.document);
});
// set jQuery object
var jQuery1_7 = window.jQuery;
// Load latest version of jquery
jQuery1_7.getScript("//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js", function(){
var jQuery1_11 = $.noConflict(true);
console.log(jQuery1_11.fn.jquery) // test the version of jquery with this, should return 1.11.0
// Add all your logic for the job below
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment