【发布时间】:2011-04-10 05:45:23
【问题描述】:
如何知道当前元素是否不是第一个子元素?
它应该与$(this)一起使用,例如:
$("li").click(function(e) {
if (/* $(this) is not the first-child */)
{
/* do something */
}
});
【问题讨论】:
标签: jquery html dom jquery-selectors css-selectors