:
$(document).ready(function(){
function set_checked {
alert('test');
$('*:checkbox').attr('checked', checked);
}
});
:
function set_checked() {
alert('test');
$('*:checkbox').attr('checked', 'checked');
}
As already mentioned, you need to () define the definition of the function and the quotation marks around "checked", but you also need the function defined in the global scope, therefore not inside the jquery onready handler.
source
share