html5微信超链接对话窗口,HTML5高仿微信聊天、微信聊天表情|对话框|编辑器功能...

之前做过一版h5微信聊天移动端,这段时间闲来无事就整理了下之前项目,又重新在原先的那版基础上升级了下,如是就有了现在的h5仿微信聊天高仿版,新增了微聊、通讯录、探索、我四个模块 左右触摸滑屏切换,聊天页面优化了多图预览、视频播放,长按菜单UI,聊天底部编辑器重新优化整理(新增多表情),弹窗则用到了自己开发的wcPop.js,具体看项目效果图吧!

html代码片段:

  • 总金额

  • 红包个数

  • 在线人数共186
  • 0.00

Js代码片段:

// ...长按弹出菜单

$("#J__chatMsgList").on("longTap", "li .msg", function(e){

var that = $(this), menuTpl, menuNode = $("

that.addClass("taped");

that.parents("li").siblings().find(".msg").removeClass("taped");

var isRevoke = that.parents("li").hasClass("me");

var _revoke = isRevoke ? "撤回" : "";

if(that.hasClass("picture")){

console.log("图片长按");

menuTpl = "

";

}else if(that.hasClass("video")){

console.log("视频长按");

menuTpl = "

";

}else{

console.log("文字长按");

menuTpl = "

";

}

if(!$(".wc__chatTapMenu").length){

$(".wc__chatMsg-panel").append(menuNode.html(menuTpl));

autoPos();

}else{

$(".wc__chatTapMenu").hide().html(menuTpl).fadeIn(250);

autoPos();

}

function autoPos(){

console.log(that.position().top)

var _other = that.parents("li").hasClass("others");

$(".wc__chatTapMenu").css({

position: "absolute",

left: that.position().left + parseInt(that.css("marginLeft")) + (_other ? 0 : that.outerWidth() - $(".wc__chatTapMenu").outerWidth()),

top: that.position().top - $(".wc__chatTapMenu").outerHeight() - 8

});

}

});

效果图:

335dca89cdb9c8911058a4d9db3ece07.png

3f07eb82d372f2c8321a7971cd359da1.png

2e5292f1e42bcac669fcf4bc8f8914d9.png

ba64957f8c99ffbf0e6f92e4e8adb8c3.png

3b1ee9b4e2501e9f0bb9a07e9c3165da.png

bbf25dd5adabac8e0953c002d18bbfe2.png

2f07fb8ac35135771cf8bd7c07185898.png

总结

以上所述是小编给大家介绍的HTML5高仿微信聊天、微信聊天表情|对话框|编辑器功能,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值