/minEmoji

minEmoji - A little library to replace Unicode emojis into a CSS span images.

Primary LanguageJavaScriptMIT LicenseMIT

#minEmoji and jMinEmoji

A small JavaScript/CSS library and jQuery Plug-in to replace Unicode Emoji into CSS Sprite images using <span> element, Apple, Google and Twitter Sprites on PNG.

jQuery Demo
Simple Demo

##Usage as jQuery plugin: Include the CSS and JS into your HTML and apply the minEmoji() function to any jQuery selector:

<link href="css/minEmoji.css" rel="stylesheet">
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="js/jMinEmoji.js"></script>
$(function(){
	$('.txt').minEmoji();
});

iOS and Apple Devices: jMinEmoji doesn't replace Emoji on Safari, but you can force that behavior passing true to the function:

$(function(){
	$('.txt').minEmoji(true);
});

##Usage as JavaScript function:

Include the CSS and JS into your HTML document and call the function minEmoji(string) to replace a desired text.

<link href="css/minEmoji.css" rel="stylesheet">
<script src="js/minEmoji.js"></script>
$('#div').html(minEmoji(string));

#Why another library?

Here is a post with the huge emoji image source files and full explanation: http://rodrigopolo.com/codigo/minemoji-another-emoji-js-library.html


License

(The MIT License)

Copyright (c) by Rodrigo Polo http://RodrigoPolo.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.