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 🙏

© 2024 – Pkg Stats / Ryan Hefner

jquery-emoji-picker

v0.2.2

Published

Add an emoji picker to any text field

Downloads

681

Readme

jQuery Emoji Picker

Description

The top 3 things your users love:

  1. Animated GIFs
  2. Emojis
  3. 🍩's

This JQuery Plugin allows you to add support for both Emojis and 🍩 to any text input on your web app. With this plugin, your desktop users can enjoy the same great Emoji support your mobile users already have. All while eating a 🍩.

Want to see a demo?

Installation

You can install the assets via bower:

$ bower install jquery-emoji-picker

Make sure that jQuery is included in your <head></head> tag. If you are not already including it, you can load it from jQuery's CDN:

<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.2.min.js"></script>

Add the following to your <head></head> tag:

<link rel="stylesheet" type="text/css" href="css/jquery.emojipicker.css">
<script type="text/javascript" src="js/jquery.emojipicker.js"></script>

<!-- Emoji Data -->
<link rel="stylesheet" type="text/css" href="css/jquery.emojipicker.a.css">
<script type="text/javascript" src="js/jquery.emojis.js"></script>

The jQuery Emoji Picker has 3 icon sets to choose from - Apple, Twitter, and Google icons. The Apple icons are used by default. To instead use Twitter or Google icons, replace the stylesheet:

<link rel="stylesheet" type="text/css" href="css/jquery.emojipicker.a.css">

with either Google:

<link rel="stylesheet" type="text/css" href="css/jquery.emojipicker.g.css">

or Twitter:

<link rel="stylesheet" type="text/css" href="css/jquery.emojipicker.tw.css">

Initialize the jQuery Emoji Picker by calling emojiPicker on an input element with optional parameters, described below:

$('.question').emojiPicker({
  height: '300px',
  width:  '450px'
});

Parameters

width (int)

The width of the picker in pixels. Must be between 280-600px. Defaults to 280px if no width is specified.

height (int)

The height of the picker in pixels. Must be between 100-350px. Defaults to 250px if no height is specified.

fadeTime (int)

The amount of time in ms that it will take for the picker to fade in and out. Defaults to 100ms if no fadeTime is specified.

iconColor (string)

The color of the smiley image that appears on the picker button. Acceptable values are ['white', 'black', 'gray', 'yellow']. Defaults to 'black' if no iconColor is specified.

iconBackgroundColor (string)

The background color of the picker button. Any hex value is acceptable. Defaults to '#eee' if no iconBackgroundColor is specified.

recentCount (int)

The number of emojis that should show in the 'Recently Used' section. Defaults to 36 if no recentCount is specified.

Note: 'Recently Used' will only show for the user if their browser supports HTML5 Local Storage.

button (boolean)

Whether to show the emoji button on the input or not. Defaults to true. If you hide the button, you will probably need to trigger the emoji entry manually (see below).

onShow (function)

Triggered once the emoji picker appears. picker (Object), settings (Object), and isActive (boolean) are returned. Example usage:

$('#question').emojiPicker({
  onShow: function(picker, settings, isActive) {
  	...
  }
});

onHide (function)

Triggered once the emoji picker disappears. picker (Object), settings (Object), and isActive (boolean) are returned. Example usage:

$('#question').emojiPicker({
  onHide: function(picker, settings, isActive) {
  	...
  }
});

Triggering Emoji Picker Manually

To trigger the button manually, you can call a jQuery function on the same element you bound it to.

$('#question').emojiPicker('toggle');

You can see an example of this in the demo.

Destroying the Emoji Picker

To remove the the emoji picker html and event listeners, simply call the emoji picker function with the destroy option:

$('#question').emojiPicker('destroy');

An example of this can be found in the demo.

Notes

jQuery Emoji Picker is disabled for mobile devices, which already support the emoji keyboard.

Attribution

The jQuery Emoji Picker would not be here without the CSS and image data generated from Wemoji: https://github.com/wedgies/wemoji

Apple Emoji: Copyright (C) Apple Inc. - OS X 10.10.3 Android Emoji: Copyright (C) The Android Open Source Project - Lollipop Twitter Emoji Copyright (C) Twitter, Inc. - The original release

License

The jQuery Emoji Picker is licensed under ISC.

About

The jQuery Emoji Picker was developed by the team at Wedgies.

Wedgies is a digital survey platform that gives media, journalists and brands in-line survey capabilities inside social media, their website, and their apps — where they can collect millions of opinions from their readers and users. Wedgies is the leading social survey platform that enables publishers to collect survey respondents directly within social media streams.

Wedgies is backed by an all-star list of investors including Vegas Tech Fund, Greycroft, Advancit Capital, MESA Ventures, Knight Foundation, kbs+ Ventures, Battle Born Ventures, Twilio, 500 Startups and SV Angel.

Wedgies' founding team consists of top talent in developer tools and community management with experience that includes Zappos.com, Overstock.com, and Backcountry.com.

Built with Wedgies