function FluidbookBackground(fluidbook) {
this.fluidbook = fluidbook;
this.hasLinks = false;
+ this.dynamicBackgroundColor = {};
this.init();
}
$("#background").prepend('<div class="links">' + this.fluidbook.settings.links.background + '</div>');
this.hasLinks = true;
}
+
+ if (Object.keys(this.fluidbook.settings.dynamicBackgroundColor).length > 0) {
+ var $this = this;
+ $(this.fluidbook).on('fluidbook.page.change.end', function (e, page) {
+ var c = $this.fluidbook.settings.dynamicBackgroundColor[page];
+ var style;
+ if (c === undefined || c === null || c === '' || c === '-') {
+ style = '';
+ } else {
+ style = "background-image:none !important;background-color:" + c + " !important;";
+ }
+ $('#background').attr('style', style);
+ });
+ }
},
resize: function (w, h) {
if (!this.hasLinks) {