我从zend框架站点获取表单并将其放在jquery mobile编写的函数中的新文件中,但是我收到此错误:
未捕获的异常:在初始化之前无法调用selectmenu上的方法; 试图调用方法'刷新'.
此文件的功能代码:
function addItem(id) {
$.ajax({
url:'http://zf.darina.php.nixsolutions.com/order/index/create-order-mobile',
dataType:"jsonp",
data:{id_good:id},
success:function (resp) {
console.log(resp);
$('.product-table').empty();
$('.product-table').append(resp.prod);
$('.product-table').append(resp.form);
$('.add-order-btn').button();
$('.mob-size').selectmenu('refresh', true);
$('#block').page();
}
})
}
Run Code Online (Sandbox Code Playgroud)