You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!" );
The text was updated successfully, but these errors were encountered:
The original code was right after testing it so I'm closing this, but maybe end could be explained a little better so it makes sense to newbie's like me.
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!" );
The text was updated successfully, but these errors were encountered: