npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

jquery-sina-emotion

v4.1.0

Published

A jQuery plugin to create Sina Weibo emotion selection dialog.

Downloads

14

Readme

jQuery Sina Emotion · GitHub license npm version

一个用于方便快速地创建新浪微博表情选择对话框的 jQuery 插件。

有何特点

  • 使用简单,一行代码即可创创建出表情选择对话框
  • 自带智能表情解析方法(但还是建议表情解析在服务端进行)
  • 兼容IE6+、Chrome、Firefox、Opera等各种浏览器

插件演示

演示地址

使用方法

// 未指定插入文本框时,自动寻找同表单中第一个 textarea 或 input[type=text] 元素
$(selector).click(function(event){
	$(this).sinaEmotion();
	event.stopPropagation();
});

// 手动指定插入文本框
$(selector).click(function(event){
	$(this).sinaEmotion(target);
	event.stopPropagation();
});

参数配置

$.fn.sinaEmotion.options = {
    pageSize: 72 // 每页显示的表情数
};

表情解析

$(selector).parseEmotion();

具体的使用方法请看 Demo

获取插件

更新日志

  • 1.0.0(2012.08.22)

  • 1.1.0

    • 完善代码并于Google Code开源
  • 1.2.0

    • 修正同一页面中对不同文本框使用该插件时插入位置错误的BUG(感谢 @BelinChung 提出)
  • 1.3.0

    • 修正IE下负margin失效导致表情换行的小BUG(由 @蜗牛都知道 发现)
  • 2.0.0

    • 全新重构插件代码
    • 新增表情解析方法
    • 开源于 GitHub码云
  • 2.1.0

    • 修复多次调用插件而对象文本框不同时,表情文本插入对象错乱问题
    • 修复表情接口未返回时,多次调用解析表情方法未成功解析的问题
    • 修改表情选择框显示机制,提高使用自由度(与低版本不兼容,升级插件时请注意修改调用方式,详见Demo)
    • 一些优化
  • 3.0.0

    • 兼容 webpack 等模块打包器
    • 优化代码,修复一些偶现的 Bug
    • 作为 npm 模块发布
  • 4.0.0

    • 移除新浪微博接口请求