动态加载Bootstrap Form Helper Select(.bfh-selectbox)

时间:2015-05-30 11:05:08

标签: twitter-bootstrap select

如何在表单上添加此元素后初始化Bootstrap Form Helper?

这是我尝试的但它不起作用

$('.myButton').on('click', function (e) {
        e.preventDefault();

        var textafter = '<div id = "steps_sto_list_'+nextID+'" class="form-group"><div class="bfh-selectbox" style = "float:left;" data-name="newproblem['+nextID+'][\'problem_type\']" data-value="0" data-filter="true"><div data-value="0">Select TYPE</div><div data-value="1">VALUE 1</div><div data-value="2">VALUE 2</div></div></div>';

        $('.bfh-selectbox').bfhselectbox('toggle');

        var item = $(textafter).hide().fadeIn(800);
        $('div#steps_sto_list_' + currentID).after(item);

    });

0 个答案:

没有答案