Vlad Kurkin (b_vladi) wrote in changelog,
Vlad Kurkin
b_vladi
changelog

[livejournal] r21472: LJSUP-11421: Cliend-side development for...

Committer: vkurkin
LJSUP-11421: Cliend-side development for Trava.ru
U   trunk/htdocs/js/jquery/jquery.lj.modalWindow.js
Modified: trunk/htdocs/js/jquery/jquery.lj.modalWindow.js
===================================================================
--- trunk/htdocs/js/jquery/jquery.lj.modalWindow.js	2012-03-20 13:32:24 UTC (rev 21471)
+++ trunk/htdocs/js/jquery/jquery.lj.modalWindow.js	2012-03-20 13:45:10 UTC (rev 21472)
@@ -80,8 +80,10 @@
 		},
 
 		updatePosition: function () {
+			var width = isNaN(this.options.width) ? this._popupNode.width() : this.options.width;
+
 			this._popupNode.css({
-				left: - this.options.width / 2,
+				left: - width / 2,
 				top: $(window).scrollTop() + ($(window).height() * 0.1),
 				marginLeft: '50%'
 			});
@@ -91,6 +93,7 @@
 			if (!isNaN(this.options.width)) {
 				this._contentNode.css('width', this.options.width);
 			}
+
 			if (!isNaN(this.options.height)) {
 				this._contentNode.css('height', this.options.height);
 			}

Tags: b_vladi, js, livejournal, vkurkin
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments