据我所知,我正在遵循正确的使用形式:http://api.jquery.com/multiple-attribute-selector/,但无论出于什么原因,我没有看到,我的代码不起作用。每个属性都可以独立工作(即 $(".tonight_stat_peopleThumbs li[srcid="+srcid+"]")
作品和$(".tonight_stat_peopleThumbs li[style*=inline-block]")
作品),但它们不能一起工作。jQuery多属性选择器,不工作:/
这是我在JavaScript函数:
hidePatrons = function(srcid) {
$(".tonight_stat_peopleThumbs li[srcid="+srcid+"][style*=inline-block]").each(function(){
$(this).css({"display" : "none"});
});
}
下面是从HTML一块:
<ul activepage="1" class="tonight_stat_peopleThumbs" style="width:171px">
<li id="myid" class="myclass" ptype="people" ptime="11101101" style="display:inline-block;">
<a href="http://domain.com/users/#.php">
<img src="https://graph.facebook.com/#/picture" />
</a>
</li>
</ul>
NOTE: The '#' are inserted for privacy, assume they are fbid numbers.
Bahahaha,你真漂亮!就是这样! xD谢谢你! :D – Matt