Pau*_*tas 3 jquery jquery-mobile
好吧,也许之前已经回答了,但我无法通过搜索找到任何东西......
我是jQuery Mobile的新手,我正试图<fieldset>通过页面动态地将放射线框添加到一个容器中,正如你在这个小提琴中看到的那样:http://jsfiddle.net/4V3Tm/4/
它正在发挥作用.但由于某些原因我不知道,动态添加的选择并没有像普通的放射线一样被设计.我错过了什么吗?顺便说一下,它们不应该全都扩展到页面宽度吗?(好吧,我还是诺布......)
先感谢您.
检查这个小提琴http://jsfiddle.net/YUvG9/或检查你的更新http://jsfiddle.net/4V3Tm/4/也许问题是你.trigger('create')多次打电话
$(document).on('pageinit', '#home', function () {
    var current = 3;
    $('#home input[type=button]').click(function () {
        current++;        
        $('#choices .ui-controlgroup-controls')
            .append(
                $('<input/>', {
                        'type': 'radio',
                        'name': 'choice',
                        'id': 'choice' + current,
                        'value': current,
                        'data-theme': 'd'
                    })
                    .append(
                        $('<label/>', {
                            'for': 'choice' + current
                        })
                        .text('Choice ' + current)
                )
            );
        $("#home").trigger('create')
    });
});