Side navigation
#5441 closed bug (invalid)
Opened November 02, 2009 01:30PM UTC
Closed November 02, 2009 03:36PM UTC
Selectors of multi-table
Reported by: | kyany | Owned by: | john |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | selector | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
<table id="1">
<tr id="11"><td>
<table id="1-1"><tr><td>First Row</td></tr>
</td></tr>
<tr id="12"><td>
<table id="1-2"><tr><td>Middle Row</td></tr>
</td></tr>
<tr id="13"><td>
<table id="1-3"><tr><td>Last Row</td></tr>
</td></tr>
</table>
$("#1 tr:last").html();
I want to get html text of id 13.but the result is tr's text of table 1-3
Attachments (0)
Change History (1)
Changed November 02, 2009 03:36PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
The selector is working just like it should, it got you the last tr of all the descendant tr elements. The last one happened to be in a nested table. Something like $("#1>tbody>tr:last") might be more what you wanted, but that would be best discussed in the forums and not the bug tracker.
Also, id attributes cannot start with a digit so this markup isn't valid.