The official documentation for the child selector (‘>’) states the following:
Note: The $(“> elem”, context) selector will be deprecated in a future release. Its usage is thus discouraged in lieu of using alternative selectors.
I currently have a selector of the form $("> thead th:eq(" + columnIndex + ")", context). What alternative syntax is suggested?
I’m aware of the .children() method, which could select the thead element, but would require additional selections afterwards. Multiple selection steps seem less efficient than a single selector.
I can imagine something along the lines of
context.children("thead").find("th:eq(" + columnIndex + ")")Could this work? Haven’t tested it yet.