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) };