Lettering.js without any dependencies

The plugin lettering.js allows for some neat typographical designs but I prefer not to have to use a specific framework in order to use a javascript plugin.

I’ve made a version of this excellent plugin which only uses javascript and has no dependencies. Feel free to use it on your next typographical endeavour.

Often I choose to use pure javascript for websites and it’s a shame when I have to load an entire framework for a single plugin. I hope this comes in useful for others too.

Just pass in an element, or an array of elements like so:

lettering(document.getElementById('id'));

Download it from GitHub


Notice: Array to string conversion in /var/www/joshemerson.co.uk/public_html/site/plugins/tags.php on line 22

Fatal error: Uncaught Error: Function name must be a string in /var/www/joshemerson.co.uk/public_html/site/plugins/tags.php:22 Stack trace: #0 /var/www/joshemerson.co.uk/public_html/site/templates/post.php(12): tags(Object(page)) #1 /var/www/joshemerson.co.uk/public_html/kirby/lib/template.php(36): require('/var/www/joshem...') #2 /var/www/joshemerson.co.uk/public_html/kirby/lib/template.php(25): tpl::loadFile('/var/www/joshem...', Array, true) #3 /var/www/joshemerson.co.uk/public_html/kirby/lib/site.php(203): tpl::load('post', Array, true) #4 /var/www/joshemerson.co.uk/public_html/kirby/system.php(65): site->load() #5 /var/www/joshemerson.co.uk/public_html/index.php(71): require_once('/var/www/joshem...') #6 {main} thrown in /var/www/joshemerson.co.uk/public_html/site/plugins/tags.php on line 22