Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
select all elements that are direct children of div element
select all elements that are direct children of div element
6 Antworten
+ 1
OK thank you
0
the answer is $ and 0
- 1
$("div>*")
- 1
All element is a trick. So * answer is right.
- 1
$("div>*")
- 2
use the jquery method called children()
$("div").children()
Here is the documentation:
https://www.w3schools.com/jquery/traversing_children.asp
and a code sample
https://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_traversing_children