From e86e6b286f6c8d82acb57011d254a13fde60bc6e Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 25 Feb 2013 20:50:01 -0500 Subject: [PATCH] move rss ads to the right --- app/assets/javascripts/posts.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/posts.js b/app/assets/javascripts/posts.js index 079c7a4de..bb81a72bb 100644 --- a/app/assets/javascripts/posts.js +++ b/app/assets/javascripts/posts.js @@ -327,15 +327,21 @@ if (image.length) { var x = image.offset().left + image.width() + 50; var y = image.offset().top; - if (x < 1050) { - x = 1050 + if (x > $(window).width()) { + jlist.css({ + position: "absolute", + width: "108px", + left: x + "px", + top: y + "px" + }); + } else { + jlist.css({ + position: "absolute", + width: "108px", + right: "10px", + top: y + "px" + }); } - jlist.css({ - position: "absolute", - width: "108px", - right: "10px", - top: y + "px" - }); } else { jlist.hide(); }