Comment trouver le premier noeud ancêtre dont le tag est avec jQuery?
https://stackoverflow.com/questions/1469801
-
16-09-2019
- |
-
Question
Supposons que l'objet jQuery est obj $, comment sélectionner l'ancêtre désiré?
La solution
Utilisez parents()
avec sélecteur de :first
:
obj.parents("tbody:first");
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
-
16-09-2019 - |
Question
Supposons que l'objet jQuery est obj $, comment sélectionner l'ancêtre désiré?
La solution
Utilisez parents()
avec sélecteur de :first
:
obj.parents("tbody:first");
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow