$(event.target).parents().addBack() adds the set of all parent elements of the event.target element, including the event.target element itself, to the set of matched elements
addBack() is more useful when need to add elements that were previously filtered out, while add() is more useful when need to add elements that were not part of the original set
$(event.target).parents().addBack()
adds the set of all parent elements of theevent.target
element, including the event.target element itself, to the set of matched elementsaddBack()
is more useful when need to add elements that were previously filtered out, whileadd()
is more useful when need to add elements that were not part of the original set