From 7724fd576990489e022eb02a20fa5ccbbf1ac79e Mon Sep 17 00:00:00 2001 From: Bohung Date: Wed, 26 Jan 2022 19:49:52 +0800 Subject: [PATCH] Fix bug. --- app/assets/javascripts/cancer_predict.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/cancer_predict.js b/app/assets/javascripts/cancer_predict.js index 96ae867..8946d5a 100644 --- a/app/assets/javascripts/cancer_predict.js +++ b/app/assets/javascripts/cancer_predict.js @@ -348,7 +348,7 @@ $(document).ready(function(){ $('#choice_fields .cancer_table_btn').removeClass('active'); var load_heml = $('#result_table_content').html(result.responseJSON.table); load_heml.ready(function(){ - $('#result_table_content .cancer_years').eq(0).addClass('active'); + $('#result_table_content .cancer_years').eq(-1).addClass('active'); for(var i = 0;i < $('#result_table_content .cancer_years').length;i++){ $('#result_table_content .cancer_years').eq(i).attr('index',i) }; @@ -364,7 +364,7 @@ $(document).ready(function(){ }); load_heml = $('#result_text_content').html(result.responseJSON.texts); load_heml.ready(function(){ - $('#result_text_content .cancer_years').eq(0).addClass('active'); + $('#result_text_content .cancer_years').eq(-1).addClass('active'); for(var i = 0;i < $('#result_text_content .cancer_years').length;i++){ $('#result_text_content .cancer_years').eq(i).attr('index',i) };