Instead of connect the click handler in the HTML, do it in code. You can also simplify the handler code by using the checked value directly.
Like this:
- var accetta = $(":button:contains('Accetta')");
- accetta.prop("disabled", true).addClass("ui-state-disabled");
- $("#privacy").click(function(){
- var chk = $(this).is(':checked');
- accetta.attr('disabled', !chk).toggleClass( 'ui-state-disabled', !chk);
- });