Add auto check checkbox of selected question.

This commit is contained in:
BoHung Chiu 2021-11-04 16:16:11 +08:00
parent 54dc77bfd1
commit a39e5738a5
1 changed files with 5 additions and 1 deletions

View File

@ -308,7 +308,11 @@
<%= javascript_include_tag "lib/jquery.form"%> <%= javascript_include_tag "lib/jquery.form"%>
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function(){
$('.o-question-group input').on('click',function(){
$(this).parents('.question-item').find('.question-checkbox').prop('checked',true);
})
})
<% if @survey.jump_mode %> <% if @survey.jump_mode %>
var answers = <%= @answers.to_json %>; var answers = <%= @answers.to_json %>;
var jump_tos_map = <%= @jump_tos_map.to_json %>; var jump_tos_map = <%= @jump_tos_map.to_json %>;