i m 试图改变一个子午线中包含的条块的碎块。 页: 1
<ul id="nav">
<li class="subnav current"><a href="page1.html">Page1</a>
<ul>
<li><a href="page1.html#section1a">Page 1 Section A</a></li>
<li><a href="page1.html#section1b">Page 1 Section B</a></li>
<li><a href="page1.html#section1c">Page 1 Section C</a></li>
</ul>
</li>
<li class="subnav"><a href="page2.html">Page2</a>
<ul>
<li><a href="page2.html#section2a">Page 2 Section A</a></li>
<li><a href="page2.html#section2b">Page 2 Section B</a></li>
<li><a href="page2.html#section2c">Page 2 Section C</a></li>
</ul>
</li>
<ul>
Each section has a 1060px width, a left float, and all the sections are included in a div container which overflow is hidden. Here is the script i tried :
$(document).ready(function() {
var P=($(".section").position().left)*-1
var N=(P/1060)+1
$("#nav li.current ul li:first-child").find("a").css("color","#e53f33");
$("#nav li.current ul li:nth-child(N)").click(function(){
$(this).siblings().find("a").css("color","#777777");
$(this).find("a").css("color","#e53f33");
});
});
当我在同一页上停留时,该笔记本可被罚款。 但是,即,当第1页的一米点点击第2页的链接时,即使一点点点点击另一名儿童,也改变了第一胎。 我的错误在哪里?
http://www.theworkingowl.com“rel=“nofollow”http://www.theworkingowl.com。