From 0d4dc89c73cd204d2a26e421b23eec183fbcb13d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 14 Dec 2016 10:17:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5=E7=9A=84ta?= =?UTF-8?q?b=E7=9A=84JS=E5=8F=8A=E5=85=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/show.html.erb | 145 ++++++++++++++++++--------- public/stylesheets/css/structure.css | 4 +- 2 files changed, 98 insertions(+), 51 deletions(-) diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 98a85e341..953b898fb 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -4,96 +4,141 @@ $(function(){ $($(".homepage_tab_div")[$(".homepage_tab_div").length - 1]).css("border", "none"); }); + // 个人主页的tab + function g(o){ + return document.getElementById(o); + } + function HoverLi(n){ + g('message_all_list').className='undis'; + //如果有N个标签,就将i<=N; + for(var i = 1; i <= 6; i++){ + if (g('user_homepage_tab_'+i) != null) + g('user_homepage_tab_'+i).className='flex-cell_homepage'; + if(g('message_list_content_'+i) != null) + g('message_list_content_'+i).className='undis'; + } + g('message_list_content_'+1).className='dis'; + g('user_homepage_tab_'+n).className='homepageClickBackground'; + } <% if is_current_user %> -