zone = 'zone-2';
}
- $this.sendCurrentAnswerToArea(zone);
+ let index = $this.activeScreen.find(".list-item").eq(0).data('id')
+ $this.sendCurrentAnswerToArea(zone,index);
});
},
start: function () {
-
this.activeScreen = this.quiz.screens.getActiveScreen()
this.list = this.activeScreen.find(".list")
this.listHtml = this.list.html()
return;
}
//this.quiz.screens.currentQuestionAnswers.push(area === 'zone-1' ? 1 : 2);
- console.log("index", index)
this.quiz.screens.currentQuestionAnswers.splice(index, 0, area === 'zone-1' ? 1 : 2)
this.animating = true;
@php
$keys = array_keys($question['answers']);
@endphp
- @foreach($keys as $index => $key)
- <li class="list-item {{ $index === 0 ? 'current' : '' }}" data-id="{{$key}}">
- <h4>{{$question['answers'][$key]['answer']}}</h4>
- <p>{{$question['answers'][$key]['answer_text']}}</p>
+ @foreach($question['answers'] as $index => $c)
+ <li class="list-item {{ $index === 0 ? 'current' : '' }}" data-id="{{$index}}">
+ <h4>{{$c['answer']}}</h4>
+ <p>{{$c['answer_text']}}</p>
</li>
@endforeach
<li class="overlay"></li>