Closed truongnguyen1912 closed 8 years ago
Hey there,
shouldn't the fix for the addtocalendar.load(); is not a function
problem not be to remove the ready part? I think this is only for JQuery and I'm sure this plugin is not specially for JQuery, but for Javascript.
Changing the line:
addtocalendar.load = ready(function () {
to:
addtocalendar.load = function () {
And changing:
});
addtocalendar.load();
to:
};
addtocalendar.load();
fixes the problem.
Hope this helps.
Do you miss something? I don't remove the ready
part. I just call it.
The load-function is useful to call it from the outside to initialize the plugin.
I think the problem is the "ready", which is JQuery functionality and this plugin has no dependency for JQuery, it's just a plain javascript plugin.
Thank you for pull request! But @akrohn rights, "The load-function is useful to call it from the outside to initialize the plugin.".
When I use it with npm, it show some errors.
addtocalendar
, it is because main entry in the package.json point toatc.min.js
which does not exist.addtocalendar.load(); is not a function
because callback in the ready function does not return any function.