Highlighting the cell on character (.) input only

Highlighting the cell on character (.) input only

 I have this jquery code to highlight the table cell when a number is entered. I need highlighting only when a dot (.) is entered in the cell only. So when a dot (.) is entered in the cell, the highlight will take place, other times not. here is a fiddle example.  http://jsfiddle.net/k6p3ecL5/

thank you for your help.

html: 

  1. <table>
  2.     <tr>
  3.         <td>
  4.             <input type="text" class="number" />
  5.         </td>
  6.         <td>
  7.             <input type="text" class="number" />
  8.         </td>
  9.     </tr>
  10. </table>

 the jquery code is like this:

  1. $('.number').keyup(function() {
  2.     var number = $(this).val();

  3.     try {
  4.         number = parseInt(number, 10);
  5.         if (number > 0) {
  6.             $(this).closest('td').addClass('highlight');
  7.         } else {
  8.             $(this).closest('td').removeClass('highlight');
  9.         }

  10.     } catch (e) {}
  11. });

css:
  1. td { border: 1px solid black; padding: 10px; }

  2. td.highlight { background-color: red; }