|
|
@@ -181,21 +181,6 @@ function bindEventYS() {
|
|
|
var headid = -1;//基序号
|
|
|
$.each($(".yaoshi"), function (index, item) {
|
|
|
$(item).attr('answer-id', index);
|
|
|
- //如果是打勾题、或纠错题,加上辅助头ID
|
|
|
- var parent = $(item).parent();
|
|
|
- if ($(parent).hasClass('correntQue') || $(parent).hasClass('boxQue')) {
|
|
|
- if(headid != -1) {
|
|
|
- var gid = $(parent).attr('class').replace(/.*group(\d+).*/g, "$1");//相当于偏移序号
|
|
|
- $(item).attr('parent-anid', headid +Number(gid) -1);
|
|
|
- }
|
|
|
- else {
|
|
|
- headid = index;
|
|
|
- $(item).attr('parent-anid', headid);
|
|
|
- }
|
|
|
- }
|
|
|
- else {
|
|
|
- headid = - 1;
|
|
|
- }
|
|
|
});
|
|
|
//给音频绑定一个ID
|
|
|
$.each($(".audioImg"), function (index, item) {
|
|
|
@@ -240,11 +225,18 @@ function bindEventYS() {
|
|
|
$(item).css("width", bodyWidth + "px");
|
|
|
});
|
|
|
//获取两个之间的答题点
|
|
|
- var index = 1;
|
|
|
var checkId = 0;
|
|
|
+ var headid = -1;
|
|
|
+ var groupId = -1;
|
|
|
$.each($(".multipleStart").nextUntil(".multipleEnd").filter("[class*='group']"), function (index, item) {
|
|
|
checkId = $(item).find('.yaoshi').attr("answer-id");
|
|
|
- var index = $(item).attr('class').replace(/.*group(\d+).*/g, "$1");
|
|
|
+ var gid = $(item).attr('class').replace(/.*group(\d+).*/g, "$1");
|
|
|
+ if (index == 0 || groupId != gid) {
|
|
|
+ groupId = gid;
|
|
|
+ headid = checkId;
|
|
|
+ }
|
|
|
+ $(item).find('.yaoshi').attr('parent-anid', headid);
|
|
|
+
|
|
|
var ischecked = $(item).find(".underlineContent").text().indexOf("√") > -1;
|
|
|
//勾选题
|
|
|
if ($(item).hasClass('boxQue')) {
|