Smylies, a text transform into smiley very light jQuery plugin

‹ Github project page

Getting started

Ambivalent Rocket Penguin Anchor

<textarea id="to-transform"></textarea>
<div id="smiley">
    <a href="#" data-code="-_-" title="-_-"><img src="http://emojipedia-us.s3.amazonaws.com/cache/45/99/4599951f963380afc847d357adc68ace.png" alt="Ambivalent" width="30"></a>
    <a href="#" data-code=":rocket:" title=":rocket:"><img src="http://emojipedia-us.s3.amazonaws.com/cache/f2/2e/f22eeaffb4cf3d62c240ac49e72f3745.png" alt="Rocket" width="30"></a>
    <a href="#" data-code=":penguin:" title=":penguin:"><img src="http://emojipedia-us.s3.amazonaws.com/cache/6f/8e/6f8edf85ece0d246cf35b5abdbef9275.png" alt="Penguin" width="30"></a>
    <a href="#" data-code=":anchor:" title=":anchor:"><img src="http://emojipedia-us.s3.amazonaws.com/cache/15/0a/150a8015761d76ef3c3978404bc1f47d.png" alt="Anchor" width="30"></a>
</div>
            

(function ($){
    $('textarea#to-transform').smylies({
        smiley: '#smiley'
    });
})(jQuery);
            

Options

Option Type Default Description
smiley string '#smiley' Node element containing all smilies links with their `data-code` attributes