title: Changing output text colour when positive / negative
body: <p>I have a simple bit of jQuery below which is working as expected. I would however like to change it so if the number is positive it turns green and if it is negative it turns red. I know the CSS part and so the styling isn't an issue. I am just unsure how to add the class depending on the result.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  jQuery(function($) {
      $("#cost_price").on("keyup",function() {
          var totalcost= $("#_regular_price").val() - $(this).val() 
          $(".total_cost").html(totalcost);
      })
  })
  &lt;/script&gt;
  </code></pre>