标签:blog java 使用 strong io 2014 art cti
<div> <h1>Main title</h1> <h2>Section title</h2> <p>Some content...</p> <h2>Section title</h2> <p>More content...</p> </div>
$('h1 + h2') // Select ALL h2 elements that are adjacent siblings of H1 elements.
$('h1').siblings('h2,h3,p'); // Select all H2, H3, and P elements that are siblings of H1 elements.
nextAll()
<ul> <li>First item</li> <li class="selected">Second Item</li> <li>Third item</li> <li>Fourth item</li> <li>Fifth item</li> </ul>假设要获取第二个条目之后的全部li元素,能够使用例如以下代码
$('li.selected').nextAll('li');
$('li.selected ~ li');
next()
.var topHeaders = $('h1'); topHeaders.next('h2').css('margin', '0);
jQuery -> 获取兄弟元?,布布扣,bubuko.com
标签:blog java 使用 strong io 2014 art cti
原文地址:http://www.cnblogs.com/yxwkf/p/3875772.html