Skip to main content

Bug Tracker

Side navigation

#6330 closed bug (duplicate)

Opened March 21, 2010 09:58PM UTC

Closed June 15, 2010 12:44AM UTC

'checked' attribute does not get rendered to string

Reported by: ben.page Owned by:
Priority: Milestone: 1.4.3
Component: attributes Version: 1.4.2
Keywords: checkbox checked Cc:
Blocked by: Blocking:
Description

var obj = $("<input>").attr({

type: "checkbox",

checked: true

});

creates a checkbox object which is checked. If you render that object to a string you only get

<input type="checkbox" />

you do not get checked="checked"

Attachments (0)
Change History (2)

Changed March 21, 2010 09:58PM UTC by ben.page comment:1

in order to render to a string i use:

var str = $('<div>').append(obj).remove().html();

Changed June 15, 2010 12:44AM UTC by dmethvin comment:2

resolution: → duplicate
status: newclosed

The "checked" is a dynamic property of the element; it's not a requirement that it serialize back to html. If this is being reported against IE, it's a duplicate of #769 / #3879.