$(this).parent().find('> ul')
What is this selecting, I don’t really understand what the jquery API is saying on the find() function.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It moves from the targeted element (
$(this)) to the parent, and then selects allulelements that are immediate children (not just descendants) of that parent element. Effectively, then, it just selects sibling elements of the current element, and is equivalent to:Incidentally, the jQuery API is awesome for reading about jQuery methods. To find information about something use the URL
http://api.jquery.com/and then append the method that you want to find out about.So, if you want to read about
siblings(), the URL becomes:http://api.jquery.com/siblings/.References:
parent().find().siblings().