Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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:
Blocked by: Blocking:

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 (2)

comment:1 Changed 8 years ago by dmethvin

Resolution: invalid
Status: newclosed

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

comment:2 in reply to:  1 Changed 8 years ago by anonymous

Replying to dmethvin:

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

Yes, my mistake. Should be:

<html>
<body>
<input />
<input />
</body>
</html>
Note: See TracTickets for help on using tickets.