Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jQuery表情插件需要的建议_Jquery_Jquery Plugins_Emoticons - Fatal编程技术网

jQuery表情插件需要的建议

jQuery表情插件需要的建议,jquery,jquery-plugins,emoticons,Jquery,Jquery Plugins,Emoticons,有哪些好的jQuery表情插件可用于在网页上创建类似手机短信的界面Description 假设我理解你想要什么(用表情符号图像替换:-),你可以用图像替换文本 查看样本、来源和此 样品 var表情={ 微笑:'', 可悲的是:, 眨眼:'' }; 变量模式={ 微笑:/:-\)/gm, 悲伤:/:-\(/gm, 眨眼:/;-\)/gm }; $(文档).ready(函数(){ $('p')。每个(函数(){ var$p=$(本); var html=$p.html(); $p.html(html

有哪些好的jQuery表情插件可用于在网页上创建类似手机短信的界面

Description 假设我理解你想要什么(用表情符号图像替换:-),你可以用图像替换文本

查看样本、来源和此

样品
var表情={
微笑:'',
可悲的是:,
眨眼:''
};
变量模式={
微笑:/:-\)/gm,
悲伤:/:-\(/gm,
眨眼:/;-\)/gm
};
$(文档).ready(函数(){
$('p')。每个(函数(){
var$p=$(本);
var html=$p.html();
$p.html(html.replace(patterns.smile,emoticons.smile)。
替换(patterns.sad、emoticons.sad)。
替换(patterns.wink、emoticons.wink));
});
});
更多信息
  • (来源)

    • 这是一个纯CSS表情插件

      1来自JQuery


      这可能对您有所帮助

      以下是Gmail风格动画表情的jQuery插件:

      有没有指向您想要完成的任务的链接?比如gmail中的聊天框,我们可以在其中选择表情符号。
      var emoticons = {
        smile: '<img src="path/smile.gif" />',
        sad: '<img src="path/sad.gif" />',
        wink: '<img src="path/wink.gif" />'
      };
      
      var patterns = {
        smile: /:-\)/gm,
        sad: /:-\(/gm,
        wink: /;-\)/gm
      };
      
      $(document).ready(function() {
        $('p').each(function() {
      
        var $p = $(this);
        var html = $p.html();
      
        $p.html(html.replace(patterns.smile, emoticons.smile).
        replace(patterns.sad, emoticons.sad).
        replace(patterns.wink, emoticons.wink));  
       });
      });