1

我正在尝试使用 ajax 加载 sometag ,但 JQM 没有增强我的附加代码。我试过了$(this).trigger('create')$(this).trigger('updatelayout')但它仍然无法正常工作。

然后我尝试通过函数 jquery mobile support 调用 ajax:$.mobile.changePage()

我的代码:

$.mobile.changePage({url:'/', data:'add_new_tag=true', type:'GET'}, 'slide', false, true)

在行动索引:我呈现'index.html'我已经在萤火虫中检查过它,看到响应是正确的(预期的)。但我的浏览器没有任何变化。

我错过了什么 ?我希望能得到你的帮助。谢谢 :D

4

1 回答 1

1

我也无法让 trigger('create') 方法为我工作。也许其他人 *cough (Jasper) 可以帮助我解决这部分答案。不过,我也许可以帮助您处理 changPage 代码。

试试这个 changePage 代替:

$.mobile.changePage( '/',{ 
    data: "add_new-tag=true",
    type: "get",
    transition: "slide"
});
于 2012-04-10T04:56:08.040 回答