From 34a1bb0b49567cb3085a4c87e30a1587d121353f Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 9 Sep 2016 17:54:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=A7=E5=AF=BC=E8=88=AA=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=EF=BC=8C=E7=8F=AD=E7=BA=A7=E5=90=8D=E7=A7=B0=E8=BF=87=E9=95=BF?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/layouts/_user_courses.html.erb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/views/layouts/_user_courses.html.erb b/app/views/layouts/_user_courses.html.erb index d1699b776..7e3249a55 100644 --- a/app/views/layouts/_user_courses.html.erb +++ b/app/views/layouts/_user_courses.html.erb @@ -104,4 +104,13 @@ $("#user_show_more_course").hide(); $('#user_hide_course').show(); } + + $(".course_list_menu").each(function(){ + var courseWidth = $(this).children().eq(0).width(); + var classWidth = 160 -courseWidth; + console.log(courseWidth, classWidth); + if(courseWidth < 80){ + $(this).children().eq(2).css("max-width",classWidth + "px"); + } + })