jquery week calendar
como eu crio uma função dentro de um evento?
no caso o evento de edição.
já tendei de várias formas...
eventClick : function(calEvent, $event) {
// retorna SyntaxError: function statement requires a name
mudaStatus : function(id, status) {
var newStatus;
var newStatusTxt;
if (status == 0) {
newStatus = 1;
newStatusTxt = 'status';
} else if (status == 1) {
newStatus = 0;
newStatusTxt = 'faltou';
}
$('.id_pupil_' + id).attr('rel', newStatus);
$('#status_pupil_' + id).attr('class', 'status_' + newStatus);
$('#status_pupil_' + id).html(newStatusTxt);
}
// ou assim retorna mudaStatus is not defined
function mudaStatus (id, status) {
var newStatus;
var newStatusTxt;
if (status == 0) {
newStatus = 1;
newStatusTxt = 'status';
} else if (status == 1) {
newStatus = 0;
newStatusTxt = 'faltou';
}
$('.id_pupil_' + id).attr('rel', newStatus);
$('#status_pupil_' + id).attr('class', 'status_' + newStatus);
$('#status_pupil_' + id).html(newStatusTxt);
}
}
tudo que tentei retorna undefined, esse último retorna outro erro, /applications/core/interface/imageproxy/imageproxy.php?img=http://www.andreaamado.com.br/erro.gif&key=6bcdb042df43c02733239abb847814d253eaa7a1c11e255bd8f0b9740d770997" alt="erro.gif" />
Discussão (6)
Carregando comentários...