jQuery仿win10桌面QQ聊天ui

来源:https://www.sucaihuo.com/js/669.html 2016-01-12 18:34浏览(4351) 收藏

桌面界面设计流程:首先双击qq应用,弹出登录弹出层,随便输入什么,便弹出qq好友聊天ui界面。点击好友,可弹出对话框。
jQuery仿win10桌面QQ聊天ui
分类:表单代码 > 注册登录框 难易:高级
查看演示 下载资源 下载积分: 20 积分

聊天对话框js

$('.fasong').click(function() {
        if ($('#qq-chat-text').val() == '') {
            alert("发送内容不能为空,请输入内容")
        } else if ($('#qq-chat-text').val() != '') {
            var name = $('.qq-top-name span').html()
            var ner = $('#qq-chat-text').val()
            var ners = ner.replace(/\n/g, '<br>')
            var now = new Date()
            var t_div = now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate() + ' ' + now.getHours() + ":" + now.getMinutes() + ":" + now.getSeconds();
            $('.qq-chat-txt ul').append('<li class="my"><div class="qq-chat-my"><span>' + name + '</span><i>' + t_div + '</i></div><div class="qq-chat-ner">' + ners + '</div></li>')
            $(".qq-chat-txt").scrollTop($(".qq-chat-txt")[0].scrollHeight);
            $('#qq-chat-text').val('').trigger("focus")
        }
})

聊天框滚动条js

$(".qq-hui").niceScroll({
    touchbehavior: false, cursorcolor: "#ccc", cursoropacitymax: 1, cursorwidth: 6, horizrailenabled: true, cursorborderradius: 3, autohidemode: true, background: 'none', cursorborder: 'none'
});
评论0
头像

系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791

1 2