From 61fe4efb894081c481a510dcfb66467f18ac84c0 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Sat, 29 Jun 2019 16:52:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E5=BA=93=E8=AF=A6=E6=83=85-=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=B1=95=E5=BC=80-=E7=BB=86=E8=8A=82=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/libraries/show.html.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/views/libraries/show.html.erb b/app/views/libraries/show.html.erb index 252dddec..8c55b63a 100644 --- a/app/views/libraries/show.html.erb +++ b/app/views/libraries/show.html.erb @@ -100,8 +100,12 @@ }); $(function(){ var height=document.getElementById("private_reason_ul").offsetHeight; + var one=parseInt($("#private_reason_ul").find("li").eq(0).height())+10; + var two=parseInt($("#private_reason_ul").find("li").eq(1).height()); + var plus=one+two; if(parseInt(height)>166){ $("#actionPanel").html('点击展开'); + $(".private_reason").css({maxHeight:plus+"px"}); } }) \ No newline at end of file