jQuery - Access elements in array

前端 未结 3 1256
借酒劲吻你
借酒劲吻你 2021-01-05 07:24

I need to be able to get the width of elements from an array

HTML

  • --------
3条回答
  •  独厮守ぢ
    2021-01-05 07:49

    You can also do something like this using nth-child:

    $("#container li:nth-child(1)").width(); // first li
    

提交回复
热议问题