How to use continue in jQuery each() loop?

后端 未结 4 1669
悲&欢浪女
悲&欢浪女 2021-01-29 20:13

In my application i am using AJAX call. I want to use break and continue in this jQuery loop.

$(\'.submit\').filter(\':checked\').each         


        
4条回答
  •  -上瘾入骨i
    2021-01-29 20:31

    $('.submit').filter(':checked').each(function() {
        //This is same as 'continue'
        if(something){
            return true;
        }
        //This is same as 'break'
        if(something){
            return false;
        }
    });
    

提交回复
热议问题