我创建了一个使用ajax和php的append系统的使用评论系统现在我期待让它看起来更有吸引力,所以我想要什么时候发布新评论它应该突出显示背景像背景颜色淡入然后淡出顺利,每当新的答案是贴吧的亮点是橙色底色有人能帮助我走出这将如何做,什么jQuery的功能是用来新消息背景高亮
我的jQuery像
$(document).ready(function() {
$('#sub_comment').on('click', function() {
var comment = $('#comment').val();
var store_id = $('#store_id').val();
$(document).ajaxStart(function() {
$('#wait').css('display', 'block');
});
$(document).ajaxComplete(function() {
$('#wait').css('display', 'none');
});
$.ajax({
type : "POST",
data : {comment: comment, store_id: store_id, command: 'Comment'},
dataType : 'text',
url : "includes/get_data.php",
success : function(data) {
$('#comment').val('');
$('#comments').append($(data).hide().fadeIn(2000));
}
});
});
});
能否请您提供一个小提琴? –
你能提供一个codepen吗? – madalinivascu
不熟悉codepen我试图创建一个小提琴希望这将工作 –