title: Input type number max value not working
body: <p>I have an input type number element with a min and max values. Preventing the default function I have customized it to use the with separate inputs. </p>
  
  <p>I don't know how can we trigger the max value from the input element which contains min and max attributes. Though i give max range the plus crosses the value.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('.plus').on('click', function(e) {
      var val = parseInt($(this).prev('input').val());
      $(this).prev('input').attr('value', val + 1);
  });
  
  $('.minus').on('click', function(e) {
      var val = parseInt($(this).next('input').val());
      if (val !== 0) {
          $(this).next('input').attr('value', val - 1);
      }
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    background-color:#eeeeee;
    margin: 40px;
  }
  
  .minus,
  .plus {
      border: none;
      padding: 10px;
      width: 40px;
      font-size: 16px;
  }
  
  input[type=number].quantity::-webkit-inner-spin-button { 
     -webkit-appearance: none; 
      margin: 0; 
  }
  
  .quantity {
      padding: 10px;
      border: none;
      width: 40px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="quantity-block"&gt;
      &lt;input class="minus" type="button" value="-"&gt;
      &lt;input type="number" value="1" class="quantity" size="4" min="1" max="5"/&gt;
      &lt;input class="plus" type="button" value="+"&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>