/********************************************* * repayment_simulation_index.js * ------------------------------------------- * - jquery.js *********************************************/ /* ------------------------------------------- * @init ------------------------------------------- */ // DOM縺ョ讒狗ッ峨′螳御コ�@縺溘i螳溯。� $(function(){ }); // 繝壹�繧ク縺ョ隱ュ縺ソ霎シ縺ソ縺悟ョ御コ�@縺溘i螳溯。� //$(document).ready(function(){ $(window).load(function(){ // 繝ゥ繧ク繧ェ繝懊ち繝ウ縺ォ繧医k豕ィ險倥�蛻カ蠕。 $('.radioNoteInput01').each(function(){ // 繝壹�繧ク繝ュ繝シ繝画凾縺ォ繝ゥ繧ク繧ェ繝懊ち繝ウ縺ョ驕ク謚樒憾諷九r繝ェ繧サ繝�ヨ $('input[type="radio"]', this).attr('checked', false).on('change', function(){ // 驕ク謚槭@縺溘Λ繧ク繧ェ繝懊ち繝ウ縺ョtitle螻樊€ァ蛟、縺ォ謖�ョ壹@縺溘ユ繧ュ繧ケ繝医r豕ィ險倥∈謖ソ蜈・ $('.radioNoteOutput' + $(this).closest('.radioNoteInput01').attr('class').replace(/radioNoteInput([0-9]+)/, '$1')).text($('input[type="radio"]:checked').attr('title')); }); }); // 繝�く繧ケ繝医ヵ繧」繝シ繝ォ繝峨↓繧医k豕ィ險倥�蛻カ蠕。 $('.textNoteInput01').each(function(){ // 繝壹�繧ク繝ュ繝シ繝画凾縺ォ繝�く繧ケ繝医ヵ繧」繝シ繝ォ繝峨�蜈・蜉帙r繝ェ繧サ繝�ヨ $(this).val('').on('change', function(){ // 蜈・蜉帙@縺溘ユ繧ュ繧ケ繝医ヵ繧」繝シ繝ォ繝峨�蛟、繧貞叙蠕� var rateOutput, rateInput = $(this).val(); // 蜈・蜉帙@縺溘ユ繧ュ繧ケ繝医ヵ繧」繝シ繝ォ繝峨�蛟、縺九i隧イ蠖薙☆繧句茜邇�r豎コ螳� if(500 <= rateInput){ $('.textNoteOutput01').parent().fadeOut(); }else{ if(1 <= rateInput && rateInput <= 99){ rateOutput = '18.0'; }else if(100 <= rateInput && rateInput <= 300){ rateOutput = '15.0'; }else if(301 <= rateInput && rateInput <= 400){ rateOutput = '7.0'; }else if(401 <= rateInput && rateInput <= 499){ rateOutput = '4.5'; } $('.textNoteOutput01').text(rateOutput + '��サ・荳九〒繧キ繝溘Η繝ャ繝シ繧キ繝ァ繝ウ縺悟庄閭ス縺ァ縺吶€�').parent().fadeIn(); } }); }); // 繝�く繧ケ繝医ヵ繧」繝シ繝ォ繝峨↓繧医k豕ィ險倥�蛻カ蠕。 $('.textNoteInput02').each(function(){ // 繝壹�繧ク繝ュ繝シ繝画凾縺ォ繝�く繧ケ繝医ヵ繧」繝シ繝ォ繝峨�蜈・蜉帙r繝ェ繧サ繝�ヨ var defaultNoteTxt = $('.textNoteOutput02').text(); $(this).val('').on('change', function(){ // 蜈・蜉帙@縺溘ユ繧ュ繧ケ繝医ヵ繧」繝シ繝ォ繝峨�蛟、繧貞叙蠕� var rateOutput, rateInput = $(this).val(); // 蜈・蜉帙@縺溘ユ繧ュ繧ケ繝医ヵ繧」繝シ繝ォ繝峨�蛟、縺九i隧イ蠖薙☆繧句茜邇�r豎コ螳� if(2 <= rateInput){ if(2 == rateInput){ rateOutput = '12.0'; }else{ rateOutput = '18.0'; } $('.textNoteOutput02').text(rateOutput + '��サ・荳九〒繧キ繝溘Η繝ャ繝シ繧キ繝ァ繝ウ縺悟庄閭ス縺ァ縺吶€�'); }else{ $('.textNoteOutput02').text(defaultNoteTxt); } }); }); });