nth-child(2)什么意思???http://docs.jquery.com/Selectors/nthChild#index
Selectors/nthChild
From jQuery JavaScript Library
Jump to: navigation, search« Back to Selectors
[edit]
:nth-child(index/even/odd/equation)    * Overview
    * ExamplesMatches all elements that are the nth-child of their parent or that are the parent's even or odd children.
While :eq(index) matches only a single element, this matches more than one: One for each parent with index. Multiple for each parent with even, odd, or equation. The specified index is one-indexed, in contrast to :eq() which starts at zero.    * Demo
    * View SourceFinds the second li in each matched ul and notes it.$("ul li:nth-child(2)").append("<span> - 2nd!</span>");

解决方案 »

  1.   

    在每个 ul 查找第 2 个li
      

  2.   

    nth-child(n)   返回第n个子元素. 如:li:nth-child(2) 返回 所有作为子元素的 li 项的第二个.
    :nth-child(even|odd)  返回偶数(Even) 或奇数(Odd) 子元素. 如:li:nth-child(even) 返回所有作为子元素的li项的偶数元素.
    :nth-child(Xn+Y)   返回Xn+Y计算结果的第n个子元素.如果Y为0,则被忽略. 如:li:nth-child(3n) 返回所有作为子元素的li项的每第3n个元素
      

  3.   

    <ul>
      <li>John</li>
      <li>Karl</li>
      <li>Brandon</li>
    </ul>
    <ul>
      <li>Glen</li>
      <li>Tane</li>
      <li>Ralph</li>
    </ul>$("ul li:nth-child(2)")结果:
    <li>Karl</li>,   <li>Tane</li> 
      

  4.   

    建议楼主下载一份jquery的文档,上面有很详细的解释。或者网上还有电子书的。这个是代表的这个节点下的第2个子节点,那个n是从1开始的。其他的地方都是从0开始。