2
我使用这个jQuery代码的jQuery:最后选择
$('#share_module:last').css("background-color","red");
但它总是它的第一#share_module
的HTML结构去一些什么样的这个
<div id = "share_module" class = "id of the share">
//then stuff inside
</div>
<div id = "share_module" class = "id of the share">
//then stuff inside
</div>
<div id = "share_module" class = "id of the share">
//then stuff inside
</div>
<div id = "share_module" class = "id of the share">
//then stuff inside
</div>
<div id = "share_module" class = "id of the share">
//then stuff inside
</div>
但它只是第一个。任何人都可以帮忙吗?
非常感谢! – Frank 2012-01-07 15:44:05