This is one of my first javascripts but this is what I am trying to do:

* If javascript is disabled then have the paypal radio button selected
and hide the option to change to credit card.
* If javascript is enabled then the credit card option is enabled by
default and you also have the option to pick paypal.
* If the creditcard option is selected on the radio, the relevant
fields are shown.

**This is my attempt of the code from the information I have read online**. Can anyone help me see why it isn't working?

<http://jsfiddle.net/spadez/PceBr/4/>

```
// IF JAVASCRIPT ENABLED...

// select card option by default
$('input:radio[name="creditcard"]').prop("checked", true);
// unhide payment options
$('#paymentchoice').removeClass('hidden');
// unhide card options
$('input:radio[name="creditcard"]').change(
if ($(this).is(':checked') {
    $('#card').removeClass('hidden');
}
});

```