find first occurrence of class in div

前端 未结 8 2337
傲寒
傲寒 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 05:52

    $("div.popContent:first").html()
    

    should give you the first div's content ("1" in this case)

提交回复
热议问题