我在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'
});
}
});
有原因吗?