摘要:
$('#prev ~ div') 选择 id 为prev 后面的所有同辈元素$('#prev').nextAll("div") 同上$('#prev').siblings("div") 选择 id 为prev 所有同辈元素$('#prev + div') 选择 id 为prev 后一个同辈元素,仍然返回集合元素$('parent > child') 相当于 $('parent').chidren("child")不加空格如 div.o 阅读全文
摘要:
后代元素即层级比当前元素低的所有元素,包括子元素子元素即层级比当前元素低一级的直接元素参见 http://blog.sina.com.cn/s/blog_775da6710100vzbr.htmlThis is very important.This is really very important.以上是html。运行后在浏览器里是看到This is very important.This is really very important.这样的样式,为了容易看到效果,我们不妨就尝试用添加css颜色来试一下如果运行$("div strong").css("col 阅读全文