Modify ↓
Ticket #10841 (closed bug: invalid)
.last() doesn't update
| Reported by: | iirineu@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.6.4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
HTML
<html> <input type="text" name="1" id="1" /> <input type="text" name="2" id="2" /> </html>
Javascript
$("html input").last().css("border", "1px solid red");
$("html").append('<input type="text" name="3" id="3" />');
$("html input").last().css("border", "1px solid red"); //nothing happens
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

You've appended your input element to the html element, which is invalid. Did you mean body perhaps?