How to get only direct child elements by jQuery function

后端 未结 5 1322
长情又很酷
长情又很酷 2020-12-13 03:27

I have a table structure like this:


  
    
      
        ...
      
        

        
5条回答
  •  眼角桃花
    2020-12-13 04:05

    If you have ids of both elements and you want to find direct element use below code

    $("#parent > #two")
    

    If you want a nested search you can use find. It is explained in detail here. https://handyopinion.com/jquery-selector-find-nested-child-elements/

提交回复
热议问题