JQuery, find parent

后端 未结 7 1609
日久生厌
日久生厌 2021-01-31 02:15
$(\'#thisid\').parent(\'li\');
7条回答
  •  北海茫月
    2021-01-31 03:03

    $('#thisid').parents( 'li:eq(0)' ); 
    

    Should do it. This will give you the first (:eq(0)) parent that matches being the tag you're searching for.

提交回复
热议问题