pc即時聊天所用表情外掛的記錄
http://www.jq22.com/jquery-info6363 參考網址
引入以下js、css
lib/css/jquery.mCustomScrollbar.min.css
dist/css/jquery.emoji.css
lib/script/highlight.pack.js
lib/script/jquery.mousewheel-3.0.6.min.js
lib/script/jquery.mCustomScrollbar.min.js
src/js/jquery.emoji.js
jquery.emoji.js 做以下改造(原外掛是直接加在body後面)
$(btn).parent().css("position","relative");
$(btn).parent().append( $(emoji_container))
$('#emoji_container_' + ix).css({'bottom': 30 + 'px', 'left': 0 + 'px'});
使用
hljs.initHighlightingOnLoad();
$(function(){
$("#chatmsgtext").emoji({
button: "#imfaces",
showTab: false,
animation: 'slide',
icons: [{
name: "QQ表情",
path: $ctx + "/pages/newPersonPortal/expression/img/qq/",
maxNum: 91,
file: ".gif"
},{
name: "貼吧表情",
path: $ctx + "/pages/newPersonPortal/expression/img/tieba/",
maxNum: 50,
file: ".jpg"
}]
});
})