Modify ↓
Ticket #6272 (closed bug: duplicate)
Inconsistent behavior while creating new checkbox
| Reported by: | janez | Owned by: | |
|---|---|---|---|
| Priority: | Milestone: | 1.4.3 | |
| Component: | unfiled | Version: | 1.4.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Same jQuery code produces different results in different browsers. The code bellow attaches a new checkbox, which is checked in Firefox and Chrome, while in IE (tested in IE6 and IE8) it produces checkbox which is not checked.
//using any of the bellow constructors, results are the same
var newField = $("<input></input>").attr("type", "checkbox");
//var newField = jQuery(document.createElement("input")).attr("type", "checkbox");
newField.attr("checked", "checked");
$("#someElement").after(newField);
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.

Dup of #3879.