Opened 13 years ago
Closed 12 years ago
#7795 closed bug (worksforme)
.append method fails in all version 1.4.x
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 1.next |
Component: | manipulation | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
if you use the .append method with a radio input string value with the name attribute and the checked attribute more than 2 times the checked attribute was ignored.
Example: var str1 = "<input id=\"xxx\" type=\"radio\" codice=\"xxx\" name=\"xxx\" value=\"1\" checked />"; $("#xxx").html(""); $("#xxx").append(str1);
if you call this in a onclick event more than 2 times the radio appended will be not checked.
Thanks
Change History (5)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Owner: | set to sandro@… |
---|---|
Status: | new → pending |
Please provide a reduced, working test case on jsFiddle.
comment:3 Changed 13 years ago by
Owner: | sandro@… deleted |
---|---|
Status: | pending → new |
comment:4 Changed 13 years ago by
Component: | unfiled → manipulation |
---|---|
Milestone: | 1.next → 1.4.5 |
Priority: | undecided → high |
Status: | new → open |
Thanks for taking the time to contribute to the jQuery project by writing a bug report. The next time please pay attention to the big red box which says
Please use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
I can reproduce this problem only on Safari 5 and current Chrome (IE6, Opera 10.63, FF 3.6.13/4.0b7, older Safari are fine). It looks like Webkit now passed the jQuery.support.checkClone check but still fails when appending checked inputs outside of forms.
comment:5 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | open → closed |
Checked radios are correctly appending to all container elements.
Sorry a type mistake: Example: var str1 = "<input id=\"xxx\" type=\"radio\" codice=\"xxx\" name=\"xxx\" value=\"1\" checked />"; $("#aaa").html(""); $("#aaa").append(str1);
where aaa was a div id.
Sorry