是的返回值
$(element).index();
与CSS
nth-child(index)
兼容吗?我做了一些测试,看来是这样。有人可以确认吗?
最佳答案
否... index()
是基于0
的索引,其中nth-child
使用了基于1
的索引
演示:Fiddle
是的返回值
$(element).index();
nth-child(index)
兼容吗?最佳答案
否... index()
是基于0
的索引,其中nth-child
使用了基于1
的索引
演示:Fiddle