$("#price_check").change(function () { var price = false; if ($(this).prop('checked') == true) { price = true; } else { price = false; } }