a text transform into smiley very light jQuery plugin
//bower
bower install --save yohoho.smylies
//npm
npm install yohoho.smylies
<!-- In your <body> HTML tag -->
<textarea id="to-transform"></textarea>
<div id="smiley">
<a href="#" data-code="-_-" title="-_-">Ambivalent</a>
<a href="#" data-code=":angel:" title=":angel:">Angel</a>
<a href="#" data-code=":angry:" title=":angry:">Angry</a>
<a href="#" data-code=":miaou:" title=":miaou:">Cat</a>
</div>
//in your main JS file
$('#to-transform').smylies({
smiley: '#smiley'
});
Option | Type | Default | Description |
---|---|---|---|
smiley | string | '#smiley' | Node element containing all smilies links with their data-code attributes |
jQuery latest version
Made with ♥ by Achraf Chouk
Please, read LICENSE for more details.