You should use .prop
for disabled:
$("#menuContinenti").prop('disabled', function () {
return ! $(this).prop('disabled');
});
UPDATE: didn't realize the current property value is an argument to the function; this version is even cleaner:
$("#menuContinenti").prop('disabled', function (_, val) { return ! val; });
UPDATE: ES2015
$("#menuContinenti").prop("disabled", (_, val) => !val);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…