Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions messi.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ function Messi(data, options) {
if(_this.options.show) _this.show();

// controlamos el redimensionamiento de la pantalla
jQuery(window).bind('resize', function(){ _this.resize(); });
jQuery(window).bind('resize scroll', function(){ _this.resize(); });

// configuramos el cierre automático
if(_this.options.autoclose != null) {
setTimeout(function(_this) {
_this.hide();
var value = jQuery.data(this, 'value');
var after = (_this.options.callback != null) ? function () { _this.options.callback(value); } : null;
_this.hide(after);
}, _this.options.autoclose, this);
};

Expand Down Expand Up @@ -199,7 +201,7 @@ Messi.prototype = {

unload: function() {
if (this.visible) this.hide();
jQuery(window).unbind('resize', function () { this.resize(); });
jQuery(window).unbind('resize scroll', function () { this.resize(); });
this.messi.remove();
},

Expand Down
2 changes: 1 addition & 1 deletion messi.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.