From 90f5cd2e609c23443573d7e2e77f6623a3d07101 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 18 Nov 2014 10:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=A9=E6=94=BEhtml?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=97=B6=E6=82=AC=E6=B5=AE=E6=A1=86=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84?= =?UTF-8?q?BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/_course_ad.html.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/courses/_course_ad.html.erb b/app/views/courses/_course_ad.html.erb index 8318bb5d1..f8b4781f8 100644 --- a/app/views/courses/_course_ad.html.erb +++ b/app/views/courses/_course_ad.html.erb @@ -49,6 +49,7 @@ } $("#floatpoint").css("top",YY); } - //$("#floatpoint").css("left",screen_width/2+body_width/2+5); - $(document).ready(function(){var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10);}); + function change_size(){var body_width = $("#top-menu").width(); $("#floatpoint").css("left",screen_width/2+body_width/2+10);} + $(document).ready(function(){change_size();}); + $(window).resize(function(){screen_width = $(window).width();change_size();}); \ No newline at end of file