0
我已經看到了這個問題的變化,但不是我在SO上的具體情況,所以在這裏。爲jQuery Mobile fieldset控制組動態添加無線電輸入
我在使用jQuery Mobile向現有控件組中動態添加新的無線電輸入時遇到了問題。它會添加,但樣式不正確,並且它看起來不正確地與其他輸入交互。
這裏是我的小提琴: http://jsfiddle.net/cjindustries/3mQF6/
任何人都可以看到我在做什麼錯?或者是再次重新生成整個fieldset/controlgroup的情況? :(
感謝!下面太代碼...
<div id="testPage" data-role="page">
<div data-role="content">
<fieldset data-role="controlgroup">
<legend>Radio buttons, vertical controlgroup:</legend>
<input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked">
<label for="radio-choice-1">Cat</label>
<input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2">
<label for="radio-choice-2">Dog</label>
<input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3">
<label for="radio-choice-3">Hamster</label>
<input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4">
<label for="radio-choice-4">Lizard</label>
</fieldset>
</div>
</div>
$('<input type="radio" name="radio-choice-5" id="radio-choice-5"><label for="radio-choice-5">Horse</label>')
.appendTo("fieldset");
$("fieldset").trigger('create');
衛生署格!我非常忙於尋找一個我忽略了基本HTML的jQM問題!謝謝:) – Chris
謝謝,工作正常。 – 2014-03-14 02:05:37