$("div").append($(document.createElement("input")).attr({
'id': 'post_category',
'value': 'item',
'type': 'checkbox','checked': true
}));
I am trying to create checkbox with checked but ie7 display nothing. while other browsers displays checkbox as checked. How to display checkbox selected in ie7
Code works in other browser
Solution To insert checkbox as checked in ie7
IE7 wont accept checked attribute while inserting elements. so once we append checkbox refer that checkbox and set attribute as checked.