如何在 jquery 移动设备中向列表视图添加 2 个水平单选按钮

how to add 2 radio button horizontal to listview in jquery mobile

我想在我的 simplelistview 的每一行中水平添加 2 个单选按钮

sample

你可以使用绝对定位:

<ul data-role="listview" data-inset="true" class="myCustomUL">
    <li data-icon="false"> 
        <a href="#">
            Accura
        </a>
        <div class="cust-btns">
            <fieldset data-role="controlgroup" data-type="horizontal">
                <input type="radio" name="radio-choice-h-1" id="radio-choice-h-1a" value="on" checked="checked" />
                <label for="radio-choice-h-1a">One</label>
                <input type="radio" name="radio-choice-h-1" id="radio-choice-h-1b" value="off" />
                <label for="radio-choice-h-1b">Two</label>
            </fieldset>
        </div>
    </li>
</ul>

.myCustomUL li > a {
    padding-right: 139px !important;
    min-height: 40px;
}
.myCustomUL .cust-btns {
    position: absolute;
    top: 0px;
    width: 139px;
    bottom: 0px;
    right: 0px;
    left: auto;
}

DEMO