Skip to content

tutorial has incorrect end() selection after reset.  #767

Closed
@sticker592

Description

@sticker592

The example code on http://learn.jquery.com/using-jquery-core/working-with-selections/ states that end() resets the selection back to the elements returned by find, however the api and browser console show that it resets the selection back to the content id selection returned by $("#content")
$( "#content" )
.find( "h3" )
.eq( 2 )
.html( "new text for the third h3!" )
.end() // Restores the selection to all h3s in #content
.eq( 0 )
.html( "new text for the first h3!" );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions