hey guys so im trying to check if a checkbox is checked. and if one checkbox is checked a button is enabled if more than 1 it is still disabled; button is disabled by default.
<script type="text/javascript">
var editbtn = $("#edit_contact");
editbtn.attr("disabled","disabled");
$('.contacts input:checkbox').live("click", function()
{
if(this.checked.length === 1)
{
editbtn.removeAttr("disabled");
}
else
{
editbtn.attr("disabled","disabled");
}
})
</script>
what am i doing wrong?
TIA