Removing children elements given an index?

后端 未结 3 1152
刺人心
刺人心 2020-12-30 03:29

I\'ve got a layout like this:

3条回答
  •  抹茶落季
    2020-12-30 04:16

    To remove rows 0 and 1 select rows less than 2 using the lt selector and then remove them:

    $('#parent div:lt(2)').remove();
    

提交回复
热议问题