New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parent #23
Comments
I don't know jquery. What does that do? |
Of course. When selecting a node in the tree. You can call parent on it and get its parent. |
Oh, OK, I see. You can absolutely do this. Normally the select function returns a list of nodes, but you can also get a list of zipper-locs instead. You can do that by calling select-locs instead of select. Then each item in the vector that is returned by select-locs will be a zipper, usable with all of the tree navigation functions of clojure.zip. So you'd call select-locs, instead of select, and then use clojure.zip/up on each of those to get their parents. As with any zipper, you'd want to call clojure.zip/node to get the node that you can examine before looking at it. |
Any news on this? You can do all other directions, |
Are you asking about a selector function? Doesn't the has-child selector do what you want? |
Right. That's exactly what I was looking for. Don't understand how I missed it in the docs. Thanks!!! |
Closing in favor of #40 |
Is there a way to do like a jquery .parent() ?
The text was updated successfully, but these errors were encountered: