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

AMD support #801

Open
tigusigalpa opened this issue Oct 9, 2016 · 1 comment
Open

AMD support #801

tigusigalpa opened this issue Oct 9, 2016 · 1 comment

Comments

@tigusigalpa
Copy link

Hi, Jack!
First of all - great plugin, thanks a lot for the one!
I know about 3 years ago there was an issue about AMD compatible (#427), but i dont understand is it planing for now or not?
Thanks!

@ericnewton76
Copy link

ericnewton76 commented Apr 5, 2018

+1 from me. jquery loaded via AMD so theres no global jquery, and colorbox doesnt register.

Probably need a pullrequest. For the time being will have to add a UMD loader and load it locally.

Workaround is use (requirejs) config.shim to bring colorbox into 2018:

require.config = {
  "shim": {
    "colorbox": {
      "deps": ["jquery"],
      exports: "jQuery.fn.colorbox"
    }
  }

then you can write code:

require(['jquery','colorbox'], function($,colorbox) {
  $("#gallery").colorbox();
});

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

2 participants