Doing math on variable if box is checked...

Doing math on variable if box is checked...

Hi all, this is my first post here (I think) so I hope I'm in the right area, basically I've wrote a form for a club I'm involved in and I'm trying to add the paypal fees ( 3.4% + 20p ) to a variable if 'pay by paypal' is checked, this is the jquery bit, I've put the bits I'm interested in, into a JSFiddle

Thanks in advance

  1. $('.items').click (function () {
  2. if ($(this).val() == "champcomp" || $(this).val() == "competitor" ) {
  3.     var value = "30.00"; } else { var value = "0.00"; }
  4.         $('#hidd_item1') .val(value);
  5.     }); 
  6.