diff --git a/lib/weekly.js b/lib/weekly.js index ea91d12..5d7fc1a 100644 --- a/lib/weekly.js +++ b/lib/weekly.js @@ -38,6 +38,7 @@ }, init: function() { + var self = this; this.events = []; this.oldDate = this.currentDate; @@ -60,11 +61,17 @@ this.hoverPreviewTimer = null; if(this.hoverPreviewDelay !== false) { this.el.on('mousemove', '.weekly-day', this.proxy(function(e) { + if (self.readOnly) { + return; + } this.removePreviewEvent(); this.hoverPreviewTimer = setTimeout(this.proxy(function() { this.showPreviewEvent(e); }), this.hoverPreviewDelay); })).on('mouseleave', '.weekly-day', this.proxy(function() { + if (self.readOnly) { + return; + } this.removePreviewEvent(); })); }