find first occurrence of class in div

前端 未结 8 2350
傲寒
傲寒 2020-12-14 05:45

I have the below html structure, i want to find the inner html of first div with class as \"popcontent\" using jQuery

8条回答
  •  死守一世寂寞
    2020-12-14 06:05

    first occurrence of class in div

    $('.popContent').eq(0).html('value to set');
    

    Second occurrence of class in div

    $('.popContent').eq(1).html('value to set');
    

提交回复
热议问题