Risolto. Ho usato

codice:
var checkBox = document.getElementById("privacy");
	if (checkBox.checked == true){
    var error = false;
  }
else  {
            $('#err-privacy').show(500);
            $('#err-privacy').delay(4000);
            $('#err-privacy').animate({
                height: 'toggle'
            }, 500, function () {
                // Animation complete.
            });
            error = true; // change the error state to true
        }