How to append .button() styled checkbox input to parent form

How to append .button() styled checkbox input to parent form

Hello,

Like the subject says...

So I was "successful" in re-styling a checkbox using UI .button().

However, I suspect that this has had a peculiar side effect; if I understand correctly, the original control(s) are destroyed, and recreated. Fine, fair enough. But they are re-created outside the original form, so therefore are not included in the postback.

So, ... appendTo to the rescue? Only, I try this, but it doesn't seem to work? I could be using it wrong.

  1. $(function() {
  2.     var wizDiv = $("#wizardDiv");
  3.     $("#shouldRealign").button().appendTo(wizDiv);
  4. });
This doesn't seem to be working, but I figure as long as the div is contained in my form, I should be able to append the input to it?

This doesn't seem to be working, though; I do not see the input name among my Request.Form items passed through the post back (ASP.NET MVC).