foreach循环追加一个循环并暂停事件javascript

时间:2018-07-23 05:44:58

标签: javascript jquery cordova

对于每个循环暂停事件和提交表单上的恢复事件。我创建了一个测验应用程序,因此我只需要在每个问题上打印一个问题,但在我的每个问题上则打印为多个问题。

$.each(function(index,data){
    //execute first loop and pause
    //i will append some form here .and when i submit this form now continue next loop
});


$.each(data.jobseek, function(index,element){
// alert(element.job_title);
$('#assessmentjoblist').append('<li><a href="#" onclick="detailviewjoblist('
 +element.assessment_id
 +')"<div class="col-xs-8" > <div class="row" style="margin-bottom: 0">    <div class="col-xs-4">
<div class="box" style="    text-align: center;    padding-top: 14px;"><img src="img/ment.jpg"    width= "72x"  height="72px" ></div>
</div> <div class="col-xs-8" style="color:black">
<div class="box" style="padding-top: 10px"><i class="zmdi zmdi-card-travel"></i><span style="font-family: sans-serif;font-weight: bold;font-size: 15px;text-transform:capitalize"> '
+element.assessment_title
+'</span><br>
<span>Assessment_marks: </span><span style="color: gray;     font-style: italic;">'
+element.assessment_total_marks
 +'</span><br><span style=""> assessment_skills: </span><span style="color: gray">'
 +element.assessment_skills
 +'  </span><br>   </div>    </div></div>    </a> <hr style="margin:0">  </li>');
});

这就是我的循环外观

0 个答案:

没有答案