Skip to content

Documentation for parent() method needs improvement #537

@dlwhiteman

Description

@dlwhiteman

I noticed the following in the documentation for parent() at http://api.jquery.com/parent/

"Given a jQuery object that represents a set of DOM elements, the .parent() method allows us to search through the parents of these elements in the DOM tree and construct a new jQuery object from the matching elements.

The .parents() and .parent() methods are similar, except that the latter only travels a single level up the DOM tree. "

When it says "search through the parents", it makes me think of the function of the parents() method. I get what it was trying to say, but it could be clearer. Maybe it should say "search through the immediate parents", so that it's clear that it does not traverse farther up the tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions