jQuery 属性操作 - hasClass() 方法
检查第一个 <p> 元素是否包含 "intro" 类:
$("button").click(function(){
alert($("p:first").hasClass("intro"));
});
http://www.w3school.com.cn/jquery/attributes_hasclass.asp
jQuery 遍历 - children() 方法
找到类名为 "selected" 的所有 div 的子元素,并将其设置为蓝色:
$("div").children(".selected").css("color", "blue");
http://www.w3school.com.cn/jquery/traversing_children.asp