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