jquery/jquery-mobile — Issue #2815: Dynamically created checkboxes not aligned in forms
Author: niteblade
Created: 2011-10-22 22:22:20+00:00
State: open

I have code that creates horizontal checkboxes dynamically and in RC2 they do not align in a form like they did (properly) in RC1. When I attempt to create them, rather than seeing something like:

{Label} {Dynamic Checkboxes}

I get the dynamic checkboxes stacked under their label:
{Label for Checkboxes}
{Dynamic Checkboxes}

After testing with my own code I tested with the standard checkbox example on the JQM site. When statically placed on the page it worked fine, but when injected via an html string and then created using .trigger(create) it didn't work as explained above.

Pseudocode:

var newHtml="

Font styling:

b

i

u

";
($newHtml).insertAfter({previousformelement's id}).trigger("create");