claviska / jquery-minicolors

jQuery MiniColors Plugin
MIT License
956 stars 312 forks source link

Used 'addBack' instead of 'add' for clarity and consistency #304

Closed 91k closed 1 year ago

91k commented 1 year ago

$(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