Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove need for jQuery global #352

Open
MartijnR opened this issue Oct 5, 2016 · 1 comment
Open

remove need for jQuery global #352

MartijnR opened this issue Oct 5, 2016 · 1 comment

Comments

@MartijnR
Copy link
Contributor

MartijnR commented Oct 5, 2016

e.g. by wrapping plugin like this:

(function(factory){
    if (typeof define === "function" && define.amd) {
        define(["jquery"], factory);
    } else if (typeof exports === 'object') {
        factory(require('jquery'));
    } else {
        factory(jQuery);
    }
}(function($, undefined){
  // the plugin code
}));
@MartijnR
Copy link
Contributor Author

MartijnR commented Oct 6, 2016

This PR would close this: #350

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant