diff --git a/app/views/bids/_homework.html.erb b/app/views/bids/_homework.html.erb index 0cb1ff7cc..0272f2c63 100644 --- a/app/views/bids/_homework.html.erb +++ b/app/views/bids/_homework.html.erb @@ -59,6 +59,17 @@ } ); } + + $(window).scroll(function(){ + //获取窗口的滚动条的垂直位置 + var s = $(window).scrollTop(); + //当窗口的滚动条的垂直位置大于页面的最小高度时,让返回顶部元素渐现,否则渐隐 + if( s > 600){ + $("#gotoTop").fadeIn(100); + }else{ + $("#gotoTop").fadeOut(200); + }; + });
diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb index 689eaa08b..08ea9434d 100644 --- a/app/views/homework_attach/_homeworks_list.html.erb +++ b/app/views/homework_attach/_homeworks_list.html.erb @@ -36,7 +36,7 @@ <% end %>
-
+