As the name says, I can’t get .attr('checked', false)to work with IE6. I am cloning some HTML, and then before I assign the newly cloned HTML to the element, I will skip it and clear all the checkboxes that are in the newly cloned section, which works fine in all browsers except IE 6.
Here is the code:
clone.find('input, select').each( function( i ) {
var id = $(this).attr('id');
$(this).attr('checked', '');
var name = $(this).attr('name');
$(this).attr('name', name+"_"+count)
$(this).attr('id', id+"_"+count+"_"+i)
});
clone.appendTo('[data-custom="area_wrapper"]');
Is there a way around this problem?
source
share