{"action":"closed","issue":{"url":"https://api.github.com/repos/jquery/jquery/issues/2280","labels_url":"https://api.github.com/repos/jquery/jquery/issues/2280/labels{/name}","comments_url":"https://api.github.com/repos/jquery/jquery/issues/2280/comments","events_url":"https://api.github.com/repos/jquery/jquery/issues/2280/events","html_url":"https://github.com/jquery/jquery/issues/2280","id":74461862,"number":2280,"title":"[New Feature] [PR proposal] Tree Traversal: .below()","user":{"login":"cauerego","id":560418,"avatar_url":"https://avatars.githubusercontent.com/u/560418?v=3","gravatar_id":"","url":"https://api.github.com/users/cauerego","html_url":"https://github.com/cauerego","followers_url":"https://api.github.com/users/cauerego/followers","following_url":"https://api.github.com/users/cauerego/following{/other_user}","gists_url":"https://api.github.com/users/cauerego/gists{/gist_id}","starred_url":"https://api.github.com/users/cauerego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cauerego/subscriptions","organizations_url":"https://api.github.com/users/cauerego/orgs","repos_url":"https://api.github.com/users/cauerego/repos","events_url":"https://api.github.com/users/cauerego/events{/privacy}","received_events_url":"https://api.github.com/users/cauerego/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jquery/jquery/labels/Feature","name":"Feature","color":"009800"},{"url":"https://api.github.com/repos/jquery/jquery/labels/Traversing","name":"Traversing","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-08T19:05:05Z","updated_at":"2015-09-09T18:24:12Z","closed_at":"2015-09-09T18:24:12Z","body":"Here's my full proposal: http://stackoverflow.com/a/30089307/274502\r\n\r\nIn short, it would get the first element found below, in the DOM tree.\r\n\r\nNo, `.next()` and `.siblings()` or `.nextAll()` won't cut it. Nor will any other method under the [Tree Traversal category](https://api.jquery.com/category/traversing/tree-traversal/). And I do use this quite often so I suppose there might be a good use for having such feature... But I'm not sure how elegant it would be.\r\n\r\nJavascript does have a similar function to work around this, `compareDocumentPosition` (found thanks to the other answer on that SO question), but it's not as compatible as using the universal selector with `.index()`.\r\n\r\nI'm also pretty sure this isn't the best implementation for the need, but it works. I'd love to hear comments on how to improve it as well. :)"}}