Use jquery to get the window width
This commit is contained in:
parent
46d6cb739d
commit
c85e6d919e
|
@ -67,8 +67,8 @@
|
|||
self.parent = self.$dialog.parent().length > 0 ? self.$dialog.parent() : $('body');
|
||||
var pos = self.parent.position();
|
||||
self.$dialog.css({
|
||||
left: pos.left + (window.innerWidth - self.$dialog.outerWidth())/2,
|
||||
top: pos.top + (window.innerHeight - self.$dialog.outerHeight())/2
|
||||
left: pos.left + ($(window).innerWidth() - self.$dialog.outerWidth())/2,
|
||||
top: pos.top + ($(window).innerHeight() - self.$dialog.outerHeight())/2
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue