[jQuery] retaining checkbox state in IE

[jQuery] retaining checkbox state in IE

Hello,
The following test code moves 2 form elements from one location in the DOM to another. Both elements retain their state just fine in FireFox, but in IE the current state of the checkbox is lost when the element is moved:
<script>
$(function() {
    $('#btn').toggle(
        function() {$('#d1 input').appendTo('#d2');},
        function() {$('#d2 input').appendTo('#d1');}
    );
});
</script>
<button id="btn">move</button>
<div id="d1">1:<input type="checkbox"/><input type="text"/></div>
<div id="d2">2:</div>
Is there a "preferred" way to deal with this in jQuery? I can think of a number of ways to deal with it, but I would imagine this is a very common scenario, so I thought I'd ping the group before proceeding with my hack. :-)
Thanks,
Todd
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/