I'm trying to clone a checkbox, effectively to move it from one node
to another. This works in FF, but in IE6 (not sure about IE7+) it
doesn't work properly. My issue is that the checked status gets lost.
Any ideas?
window.addEvent("domready",function() {
$("myCheck").set("checked",true);
$("myText").set("value","five");
$("two").adopt($("myCheck").clone());
$("two").adopt($("myText').clone());
});
<div id="one">
<input type="checkbox" id="myCheck">
<input type="text" id="myText">
</div>
<div id="two">
</div>
Note that the value in the text form field, is correctly copied.
Here it is in mooshell: http://mootools.net/shell/DGPA4/4/