//选择某人聊天 //点击事件无效
$(".buyer-item").on("click",function(){
console.log("-------选择某人聊天---------");
var li=document.getElementsByClassName("buyer-item");
$(li).each(function(){
$(this).css("background-color","");
});
$(this).css("background-color","#f0f6ff");
});
//点击事件有效
$(document).on('click', '.buyer-item', function(e) {
console.log("-------选择某人聊天---------");
var li=document.getElementsByClassName("buyer-item");
$(li).each(function(){
$(this).css("background-color","");
});
$(this).css("background-color","#f0f6ff");
});