TIL How to convert a jQuery plugin to Vanilla JS
POSTED ON:
TAGS: javascript
It's not that I think jQuery is awful or anything.
It's more that it's outdated (with security risks), the conveniences that jQuery provided have been incorporated into Vanilla JS, and you need to bundle jQuery with your code to make it work.
For example: to use Lettering.js, which is a reallky neat library, you need to bundle jQuery with it.
Projects like this make me happy:
Converting a jQuery plugin to vanilla JS: Lettering.js
The original jQuery version:
https://github.com/davatron5000/Lettering.js/blob/master/jquery.lettering.js
The updated Vanilla version (by Chris Ferdinandi):
https://gist.github.com/cferdinandi/68bae3f551d7daff8d442e232c499307
Related TILs
Tagged: javascript