私は通知システムに取り組んでおり、クラスを削除したり、ajax の成功で html() と append() 以外のことをしたりするのに問題があります。ここに私のコードがあります:
setInterval(function (){
$(".notificare_caseta").each(function(){
var id=$(this).attr("record");
$.ajax({
url : "../template/functions/notificari.php?nr="+id,
contentType: "application/json; charset=utf-8",
dataType:"JSON",
success : function(data) {
$(".notificari_zona"+id).html(data.notif);
if(data.note>0){
$(".notificari_note"+id).html(data.note);
}else{
$(".notificari_note"+id).addClass('nu_arata');
$(".notificari_note"+id).prev().removeClass("atentionare");
$(".notificari_note"+id).next().addClass("nu_arata");
}
}
});
});
$("#data").load("../template/functions/data.php");
}, 2000);
誰でも私を助けることができますか?next、prev、removeclass、addclass 関数が機能しない。ありがとう