forked from o2o-qianduan/xfn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
112 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,26 @@ | ||
/*****个人中心根据左边导航切换右边区域内容 *************june**---start*/ | ||
/*var $div_ul = $(".current_list ul"); //获取类current_list中的ul | ||
$div_ul.click(function () { | ||
var index = $div_ul.index(this); //获取当前点击的<ul>元素在全部<ul>元素中的索引 | ||
$("要显示的div元素")//选取要显示的div区域元素 | ||
.eq(index).show();//显示<li>元素对应的<div>元素 | ||
.siblings().hide();//隐藏其他几个同辈的<div>元素 | ||
});*/ | ||
var $div_li = $(".current_list ul li"); //获取ul中的li元素 | ||
/****个人中心根据左边导航切换右边区域内容 *************june**---start*/ | ||
/*var $div_ul = $(".per_center ul"); //获取类current_list中的ul | ||
var uLen=$div_ul.length; | ||
var $div_li = $(".current_list ul li a"); //获取ul中的li元素 | ||
var lLen=$div_li.length; | ||
$div_li.click(function () { | ||
$(".right_div").html(""); | ||
var index = $div_li.index(this)+1; //获取当前单机的<li>元素在全部<li>元素中的索引 | ||
var Pindex=$div_li.parent().index;//获取父元素的索引 | ||
$('#tab-'+Pindex"-"+index)//选取要显示的div区域元素 | ||
.eq(index).show();//显示<li>元素对应的<div>元素 | ||
.siblings().hide();//隐藏其他几个同辈的<div>元素 | ||
}); | ||
/*****个人中心根据左边导航切换右边区域内容*************june**---end*/ | ||
alert(this.attr("href"));*/ | ||
// $(".right_div").html(""); | ||
/* var index = parseInt($div_li.index(this))+1; //获取当前单机的<li>元素在全部<li>元素中的索引 | ||
var Pindex=parseInt($div_li.parent().index);//获取父元素的索引 | ||
for(var i=0;i<uLen;i++) | ||
{ | ||
if(Pindex==i) | ||
$('#tab-'+Pindex"-"+index).css({"display":"block"});//选取要显示的div区域元素 | ||
} | ||
$('#tab-'+Pindex"-"+index).css({"display":"block"});//选取要显示的div区域元素*/ | ||
/*.eq(index).show();//显示<li>元素对应的<div>元素 | ||
.siblings().hide();//隐藏其他几个同辈的<div>元素*/ | ||
/* });*/ | ||
|
||
|
||
|
||
/*****个人中心根据左边导航切换右边区域内容*************june**---end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.