As you typed in the input field appear the the button radios below

0

I made the following code for when typing in the input field to appear the radio buttons below but it does not work, could anyone help me?

$('#amount').onchange('input', function(){
    var dinheiro = $(this).val();
    if (dinheiro <= 5) {
      $("#valArrecadar").show();
      $("#valArrecadar2").hide();
      $("#valArrecadar3").hide();
      $("#valArrecadar4").hide();
      $("#valArrecadar5").hide();  
    } else if (dinheiro <=10) {
      $("#valArrecadar").hide();
      $("#valArrecadar2").show();
      $("#valArrecadar3").hide();
      $("#valArrecadar4").hide();
      $("#valArrecadar5").hide()
    } else if (dinheiro <=25) {
      $("#valArrecadar").hide();
      $("#valArrecadar2").hide();
      $("#valArrecadar3").show();
      $("#valArrecadar4").hide();
      $("#valArrecadar5").hide()
    }else if (dinheiro <=50) {
      $("#valArrecadar").hide();
      $("#valArrecadar2").hide();
      $("#valArrecadar3").hide();
      $("#valArrecadar4").show();
      $("#valArrecadar5").hide()
    }
  });
    
asked by anonymous 14.09.2018 / 15:57

0 answers