title: function to compute and input average speed
body: <p>I have 3 input fields, distance, time and average speed.  I would like the average speed field to be automatically computed to minimise user effort.  As such I have come up with this function but it doesn't work:</p>
  
  <pre><code>$('#Avg Speed').click(function(event) {
              var distance = $('#Distance');
              var time = $('#Time');
              var speed = distance / time;
              $(this).append(speed);
          });
  </code></pre>
  
  <p>Any ideas? Even better than clicking the field would be that the result automatically comes up once distance and time is completed.  No doubt my code reveals what a novice I am at this stuff. </p>