We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2422bd7 commit 7047214Copy full SHA for 7047214
src/js/lightbox.js
@@ -61,8 +61,12 @@
61
};
62
63
Lightbox.prototype.init = function() {
64
- this.enable();
65
- this.build();
+ var self = this;
+ // Both enable and build methods require the body tag to be in the DOM.
66
+ $(document).ready(function() {
67
+ self.enable();
68
+ self.build();
69
+ });
70
71
72
// Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes
0 commit comments