What is the meaning of this selector: $("#someID > * *")
I know that >
means child nodes and *
means all nodes, but I'm confused by the two asterisks. Any ideas?
Description. "$("div p")" Selects all elements matched by <div> that contain an element matched by <p>.
A selector is one of the properties of the object that we use along with the component configuration. A selector is used to identify each component uniquely into the component tree, and it also defines how the current component is represented in the HTML DOM.
It selects all grandchildren or lower of #someID
.
#someID > *
selects all direct children of #someID
.
Adding *
will select all descendants of those children. (but not the children themselves)
Thus, it will select all descendants of #someID
except for its direct children.
It could also be written as $('#someID *').not('#someID > *')
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With