Skip to content

Instantly share code, notes, and snippets.

@davearel
Last active November 15, 2016 13:51
Show Gist options
  • Save davearel/9254418 to your computer and use it in GitHub Desktop.
Save davearel/9254418 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.
});
@davearel
Copy link
Author

I agree with @visionmedia's point, but I don't see that happening.

@davearel
Copy link
Author

Conversation has migrated to: https://gist.github.com/tbranyen/9255362

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment