这个可能行吗?
这是我的代码:
$("ul#filterlist li:nth-child(3n)").css("marginTop", "0");
如果我想将其应用于列表,但仅适用于列表中可见的项目(有些被隐藏起来,我不希望它们被计算在内),该怎么办?我在想类似于:
$("ul#filterlist li:nth-child(3n)").not(":hidden").css("marginTop", "0");
但这不起作用。我试过使用:visible,但也不行。有什么想法吗?谢谢。