Jquery同步运行 [英] Jquery functions synchronously

查看:61
本文介绍了Jquery同步运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里我必须进行调用sync.In下面的函数循环有2个函数。我想逐个执行这两个函数(同步调用),然后进入下一个循环。





请给我一个很好的建议

谢谢&此致,

Soumya

Here I have to make call sync.In Below functions the Loop having 2 functions.I would like to execute these 2 functions one by one(synchronous call)and then go to the next loop.


Please give me a good advice
Thanks & Regards,
Soumya

for (i = 0; i < per_array.length; i++) {

        $(function () {
            {
            $('input:checkbox').each(function (index, value) {
                if (this.id == per_array[i]) {
                    //alert(per_array)
                    $(this).prop('checked', true);
                    if ($(this).is(':checked')) {
                        id = this.id;

                       var para = 'title_id=' + id;

    

      mvc3prject.common.GetData('url', para, null, Fieldslist, null);

       mvc3prject.common.GetData('url', para, null, functionlist, null);


                    }

                }
            });
          
        });

    }

推荐答案

(function(){
{
(function () { {

' input:checkbox')。each(function(index, value ){
if this .id == per_array [i]){
// alert(per_array)
('input:checkbox').each(function (index, value) { if (this.id == per_array[i]) { //alert(per_array)


this )。prop(' 已检查' true );
如果
(this).prop('checked', true); if (


这篇关于Jquery同步运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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