allowing input only for float number
<p>I have pain-time when making input that only allows float number with jquery library. my code can't prevent chacacter "." when it's becoming first input, can anyone guide me to solve this problem? </p>

<pre><code>$('.filterme').keypress(function(eve) {
   if (    ( eve.which != 46 || $(this).val().indexOf('.') != -1 ) 
        &amp;&amp; ( eve.which &lt;  48 || eve.which &gt; 57 ) 
        || ( $(this).val().indexOf('.') == 0) 
      )
   {
       eve.preventDefault();
   }
});​
</code></pre>
