// 基本选择器===================================
// id选择器 $(‘#layer1‘).html(‘aaaa‘);
// 元素选择器 $(‘p‘).html(‘ppppp‘);
// 类选择器 $(‘.my_p‘).html(‘my_p‘);
// 并集选择器 $(‘#layer1,#layer2,#layer3‘).css(‘border‘,"1px solid red");
// ==========================================================
// 层级选择器======================================================
// 后辈选择器 $(‘#Hierarchy div ul li.my_li‘).css(‘background‘,"#ccc");
// 直接子元素选择器 $(‘#Hierarchy>ul‘).css("background",‘#ccc‘);
// 同级直接后一个元素 $(‘#Hierarchy div.div1 ul+p‘).css(‘background‘,"#ccc");
// 同级后面所有元素 $(‘#Hierarchy div.div1 ul~p‘).css(‘background‘,"#ccc");
//==============================================================================
// 过滤选择器 // 过滤出第一个 $(‘li:first,li:last‘).css(‘border‘,‘1px solid red‘);
// 排除过滤器 $(‘li:not(:first)‘).css(‘border‘,‘1px solid red‘);
//找出没有选中的checkbox $(‘input:not(:checked)‘).attr(‘checked‘,‘true‘);
// 索引奇数偶数过滤器 $(‘table tr:odd‘).css(‘background‘,‘#ddd‘);
// 索引 大于小于过滤器 $(‘table tr:lt(2)‘).css(‘background‘,‘#ddd‘);
$(‘#basic‘).animate({ ‘width‘:‘400px‘, ‘height‘:‘400px‘ },1000);
原文:http://www.cnblogs.com/yzhong/p/5014845.html