调用函数后如何重定向到页面已经完成 [英] how to redirect to page after call to the function has been completed

查看:108
本文介绍了调用函数后如何重定向到页面已经完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,

我的功能如下

Hi friends,
I have function as below

 $(document).on('click', '#btnVwProfl', function () {
                
    var result = $(this).parents('div[data-role="footer"]').siblings('.ui-grid-a').find('#lblempID').text();

    getOrgList(result);
    
    $.mobile.changePage("#divDetails", { transition: "slide", reloadPage: false, changeHash: true });
});





我希望在函数getOrgList之后调用changePage(执行。



如何使用jQuery实现相同的目标?



我们如何实现$。 when()。then()或$ .when()。done()实现上述目标?



我正在使用1.7-2版本的jQuery



提前致谢



I want the changePage to be called after the function getOrgList() execution.

How can I achieve the same using jQuery?

How can we implement $.when().then() or $.when().done() to achieve the above?

I'm using 1.7-2 version of jQuery

Thanks in advance

推荐答案

(文件).on('click','#btnVwProfl',函数(){

var result =
(document).on('click', '#btnVwProfl', function () { var result =


(thi 。UI栅-A。S)。家长( DIV [数据角色= 页脚])的兄弟姐妹()找到(#lblempID)文本();

getOrgList(result);
(this).parents('div[data-role="footer"]').siblings('.ui-grid-a').find('#lblempID').text(); getOrgList(result);


.mobile.changePage(#divDetails,{transition:slide,reloadPage:false,changeHash:true}) ;
});
.mobile.changePage("#divDetails", { transition: "slide", reloadPage: false, changeHash: true }); });





我希望在函数getOrgList()执行后调用changePage。



如何使用jQuery实现相同目标?



我们如何实现



I want the changePage to be called after the function getOrgList() execution.

How can I achieve the same using jQuery?

How can we implement


这篇关于调用函数后如何重定向到页面已经完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆