Skip to content

Instantly share code, notes, and snippets.

@felipepodesta
Forked from davearel/jquery_amd.js
Created March 5, 2014 22:48
Show Gist options
  • Save felipepodesta/9378331 to your computer and use it in GitHub Desktop.
Save felipepodesta/9378331 to your computer and use it in GitHub Desktop.
define([
// jquery core is always required
'jquery/core',
// jquery utilities
'jquery/ajax',
'jquery/data'
], function(jq, ajax, data) {
// Using the core module, create a jQuery instance
// with the required extensions
var $ = jq.require(ajax, data);
// The local instance of $ contains the necessary jQuery
// extensions, but once this module is done executing,
// "$" no longer exists to other modules.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment