Skip to main content

Bug Tracker

Side navigation

#10841 closed bug (invalid)

Opened November 21, 2011 11:11AM UTC

Closed November 21, 2011 02:20PM UTC

Last modified November 21, 2011 04:35PM UTC

.last() doesn't update

Reported by: iirineu@gmail.com 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
Attachments (0)
Change History (2)

Changed November 21, 2011 02:20PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

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

Changed November 21, 2011 04:35PM UTC by anonymous comment:2

Replying to [comment:1 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>