Code not working:
if($('#primayins').attr('checked'))
{
$("#tx_nm0x0_pricingplan").val(1);
}
else
{
$("#tx_nm0x0_pricingplan").val(2);
}
Every time it is getting false
Code not working:
if($('#primayins').attr('checked'))
{
$("#tx_nm0x0_pricingplan").val(1);
}
else
{
$("#tx_nm0x0_pricingplan").val(2);
}
Every time it is getting false
Try with:
if($('#primayins').prop('checked'))
...
Alternatively:
if($('#checkbox').is(':checked'))
...