关于ajax成功的JQM更改页面

时间:2012-02-16 14:23:23

标签: jquery ajax jquery-mobile

我在AJAX调用成功后尝试了JQM函数changepage方法但它似乎根本没有工作。

以下是我的代码:

$.ajax({
    url: '/Users/delete_favourites/' + $(this).attr('id'),
    cache: false,
    async: false,
    success: function(msg) {
        var msg = JSON.parse(msg);
        console.log(msg.FavouriteSuburb);
        alert(msg.FavouriteSuburb.name + " has been successfully deleted from your list of favourites.");
        $.mobile.changePage('/Users/my_favourite_suburbs/', {
            reloadPage: true
        }, {
            allowSamePageTranstion: true
        }, {
            transition: 'none'
        });
    }
});

有原因吗?

0 个答案:

没有答案