title: How to set a maxLength of NUMBER input with jQuery
body: <p>Sounds trivial, but it doesn't work for me... I tried to set a max length of <strong>NUMBER</strong> input, but it doesn't work. 
  Your help is appreciated. Here's my code. Both don't work in Chrome</p>
  
  <pre><code>&lt;input id="demo02" type="number"&gt;
  
  $(document).ready(function(){
  $("#demo02").attr('maxlength','2');
  });
  
  $(document).ready(function(){
  $("#demo02").prop('maxlength','2');
  });
  </code></pre>