-
Notifications
You must be signed in to change notification settings - Fork 284
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
Added support to AMD and CommonJS #356
Conversation
So you can do something like this (solve global yadcf) var yadcf; yadcf = (function ($) { |
2dbcd30
to
cfd0b10
Compare
cfd0b10
to
28986f6
Compare
I've fixed the global with the following lines because Webpack (and I think both AMD and CommonJS) automatically wraps the code in a closure, so simple variables became automatically locals instead of globals. if (window) {
window.yadcf = yadcf;
} Now it should be ready to be merged. |
Thanks! |
When do you think we will see this code published (on npm)? |
It will be in a few days |
Hi vedmark, I'm still here. |
Hi, |
I created a new pull request, it should work as expected. Ps: Why there are two "jquery.dataTables.yadcf.js" files? One is under "src/" folder... |
I'm using webpack and without this I'm not able to do
because yadcf is not available.
I've followed this guide.
Ps: I've not tested this in a simple browser environment but it should works.
Update: there is a problem, inline codes like
onclick="yadcf.stopPropagation(event);"
can't works without the globalyadcf
variable.