title: Jquery: How to bind keypress event to an input type 'number' based on attribute value
body: <p>I want to perform a validation only when the input field is of <code>number</code> type and corresponding attribute <code>validate</code> has value <code>checkit</code>. I am not sure what should I pass in place of astrix to bind this to keypress event <code>$('*** input[type=number]').bind</code> mentioned in the code below. I am stuck here, any help in this regard is appreciated.</p>
  
  <pre><code>&lt;input type="number" validate="checkit"&gt;
  
  $('input[type=number]').bind('keypress', function(e) {
      //do things here
  });
  </code></pre>