insertAdjacentHTML();

Like so many others, a lot of my 2017 extracurricular coding has been focussed around learning more JavaScript. Last week, I refactored Holy Guacamole! to utilize vanilla JavaScript instead of jQuery.

I originally built it in 2015 and revisiting my code was one of those startling, “Oh-goodness-look-at-all-these-cobwebs-WHY-would-I-put-that-THERE?!” moments. One of the super helpful translation moments was learning more about insertAdjacentHTML();.

I then may or may not have gotten a little carried away with creating a CodePen to show off the different positions you can pass it as arguments.

See the Pen insertAdjacentHTML + r2 droid by Allison Tarr (@allisonplus) on CodePen.0

Leave a Reply

Your email address will not be published.