title: Why must I focus out or press Enter once in two to continue?
body: <p>I have a problem with my script.</p>
  
  <p>When I change an input number by arrows to up or down value, it is supposed to calculate another value.
  First time it's okay but then I must lose focus (by clicking out or pressing <code>Enter</code>) to calculate or I must wait several seconds...</p>
  
  <p>This is my .js :</p>
  
  <pre><code>$(document).ready(function(){
  
      calcul_prix();
  
      $("#largeur_conf").change(function(){
          calcul_prix();
      });
  
      $("#hauteur_conf").change(function(){
          calcul_prix();
      });
  
      $("#nb_rideaux_1").click(function(){
          calcul_prix();
      });
  
      $("#nb_rideaux_2").click(function(){
          calcul_prix();
      });    
  });
  
  function calcul_prix()
  {
      verif_saisie();
  
      var largeur = parseInt(document.getElementById("largeur_conf").value);
      var hauteur = parseInt(document.getElementById("hauteur_conf").value);
      var nb_rideaux = parseInt(document.querySelector('input[name="nb_rideaux"]:checked').value);
  
      prix_confection = largeur * nb_rideaux;
  
      $('#prix_final').text(formatCurrency(prix_confection, currencyFormat, currencySign, currencyBlank));
  }
  
  function verif_saisie()
  {
      var largeur = parseInt(document.getElementById("largeur_conf").value);
      var hauteur = parseInt(document.getElementById("hauteur_conf").value);
  
      if(largeur &gt; 500 || largeur &lt; 50) 
      {
          document.getElementById("largeur_conf").value = 50;
      }
  
      if(hauteur &gt; 500 || hauteur &lt; 50) 
      {
          document.getElementById("hauteur_conf").value = 50;
      }
  }
  </code></pre>