Opened 10 years ago
Closed 10 years ago
#13831 closed bug (invalid)
bug with $(domelement).text(undefined)
Reported by: | ranjitsss | Owned by: | ranjitsss |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.9.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Essentially
var b={};
$("selector").append($("<table></table>").append($("<tr></tr>").append($("<td></td>").text(b.id))))
will not create any dom element since b.id is undefined. But in Jquery 1.9.1 its appending dom element in selector.
M not sure whether its a bug or not but in previous version this was not the case.
Change History (3)
comment:1 Changed 10 years ago by
Owner: | set to ranjitsss |
---|---|
Status: | new → pending |
comment:2 Changed 10 years ago by
You might want to fork from this, which is a "works for me" copy of your use case: http://jsfiddle.net/ATSwk/
comment:3 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Hi, can you put an example on jsfiddle.net or jsbin.com that demonstrates the problem? I can't imagine a selected element that would let you append a
<table>
,<tr>
, and<td>
to it. And, according to the documentation,.text()
wants a string, whichundefined
is not.