例如:
$('ul').find('li.a').操作;
这样很容易,如何利用find找.text('a')的p呢?
$('body').find(????);
ringa_lee
用filter$('body').filter(function(){ return $(this).text() === 'a';})
$('body').filter(function(){ return $(this).text() === 'a';})
http://www.w3school.com.cn/jquery/traversing_filter.asp
http://www.css88.com/jqapi-1.9/filter/
用filter
$('body').filter(function(){ return $(this).text() === 'a';})
http://www.w3school.com.cn/jquery/traversing_filter.asp
http://www.css88.com/jqapi-1.9/filter/