Please update docs on Shadowbox.init

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Please update docs on Shadowbox.init

Felix Buenemann
Hello,

I just spend two hours or so, because Shadowbox wasn't loading, if I used window.onload = Shadowbox.init(); or window.onload = Shadowbox.init(options); – Shadowbox would just throw random exceptions, that didn't help.

I later figured out that I need to use this syntax:
window.onload = function() {
  var options = {};
  Shadowbox.init(options);
}
in order for things to work. I guess the part of the docs where it mentions the options it now only has a jquery example, so it would be nice to have the standard syntax above mentioned aswell.

Best Regards,
   Felix

Reply | Threaded
Open this post in threaded view
|

Re: Please update docs on Shadowbox.init

mjijackson
Administrator

That's odd that you would try and use the window.onload = Shadowbox.ini(); syntax because it's not mentioned anywhere in the documentation.

However, both the window.onload = Shadowbox.init; and the window.onload = function(){ Shadowbox.init(); } examples are already given on the usage page. Next time, a quick 5 minute read can help you save two hours.