Bug Tracker

Opened 12 years ago

Closed 12 years ago

#7096 closed bug (invalid)

Bug on children() method

Reported by: j-willette Owned by:
Priority: blocker Milestone: 1.4
Component: selector Version: 1.4.2
Keywords: children Cc:
Blocked by: Blocking:

Description

HTML structure :

<div id="foo1" class="foo" style="background:red">

<div class="bar">

<div class="content"></div>

</div>

</div>

<div id="foo2" class="foo" style="background:blue">

<div class="bar">

<div class="content"></div>

</div>

</div>

Bug of this use :

$( '#foo2' ).children( '.bar .content:first' ).html( 'Some text' );

Writes in the first HTML block.

However this is ok :

$( '#foo2' ).children( '.bar' ).children( '.content:first' ).html( 'Some text' );

Change History (1)

comment:1 Changed 12 years ago by snover

Resolution: invalid
Status: newclosed

This is not a bug. You are calling the wrong method; use find. In the future, please use the jQuery Forum for bug reports.

Note: See TracTickets for help on using tickets.