title: positive integer value using jquery/javascript
body: <p>I am using following js function in my asp.net MVC application on click of Ok button to make sure that value entered in the text box is integer but it always returns false;</p>
  
  <pre><code>function isInteger(n) {
      return n === +n &amp;&amp; n === (n | 0);
  }
  </code></pre>
  
  <p>and here is how I am using it:</p>
  
  <pre><code>  if (!isInteger(selectedPhoneValue)) {                      
       $("#dialog-numeric-phonevalidation").dialog('open');
        return;
       }
  </code></pre>
  
  <p>Please suggest me how to change this function to allow only positive integer/numberic value without "." and "-"</p>