Edu
Hub
Courses
AI Tools
Leaderboard
Login/Register
AR
Abdullah Rashid
abdullah@example.com
Navigation
📚
Courses
🏆
Leaderboard
✨
AI Tools
←
jQuery Traversing Mastery
⏱
15:00
Quit
0 / 20 answered
0%
jQuery Traversing Mastery
10 questions · Medium difficulty · 00:20:00 min
🔥 In Progress
Question 1
Which jQuery method is used to get the direct parent of each element in the current set of matched elements?
parentUntil()
parents()
parent()
closest()
Question 2
What does the `.children()` method return?
All descendant elements
All sibling elements
The parent element
Only direct child elements
Question 3
Which method would you use to get the next sibling of each element in the set?
nextAll()
prev()
next()
siblings()
Question 4
What is the difference between `.parent()` and `.parents()`?
.parent() returns a list, .parents() returns a single element
.parent() returns all ancestors, .parents() returns only direct parent
They are identical
.parent() returns direct parent, .parents() returns all ancestors
Question 5
Which method is used to traverse down the DOM tree to find elements matching a selector?
children()
each()
find()
filter()
Question 6
What does the `.siblings()` method return?
All child elements
Only the next sibling
The parent element
All elements at the same level as the current element
Question 7
How can you get the first ancestor of an element that matches a given selector?
find()
parents()
parent()
closest()
Question 8
Which method would you use to iterate over a jQuery object and execute a function for each element?
loop()
map()
filter()
each()
Question 9
What does `.prev()` return?
The previous sibling element
All previous siblings
The previous ancestor element
The previous parent element
Question 10
How can you filter the current set of elements to those that match a specific selector?
find()
filter()
not()
children()
Question 11
Which method returns all ancestor elements between the current element and a given selector?
closest()
parentsUntil()
parent()
parents()
Question 12
What does `.nextAll()` return?
All preceding siblings
All children
Only the next sibling
All following siblings
Question 13
Which method is used to get the first element in the set that matches a selector, traversing up the DOM tree?
closest()
parent()
prev()
find()
Question 14
How can you select all elements that are direct children of a div with class 'container'?
$('.container').parent()
$('.container').children()
$('.container > *')
$('.container').find('*')
Question 15
What does `.end()` do in jQuery?
Stops event propagation
Ends the script execution
Ends the current jQuery chain and returns to the previous set
Removes all elements from the set
Question 16
Which method would you use to get the previous siblings until a certain selector is found?
prevAll()
prev()
parentsUntil()
prevUntil()
Question 17
How do you select the immediate parent of an element with id 'child'?
$('#child').parent()
$('#child').closest()
$('#child').prev()
$('#child').parents()
Question 18
What is the result of `$('ul').children('li.active')`?
All active li elements anywhere
All li elements inside ul that have class 'active'
The ul that contains an li with class 'active'
All li elements inside ul
Question 19
Which method allows you to add elements to the current set of matched elements?
add()
merge()
append()
concat()
Question 20
What does `.first()` do?
Returns the first ancestor
Returns the first sibling
Returns the first element in the current set
Returns the first child of each element
✅ Answered:
0
⬜ Unanswered:
8
📊
20%
done
Submit Answers →