I tried to use this code below, which adds buttons in slideshow on my site:
window.onload = function loadContIcons() {
var elem = document.createElement(\"im
For all those facing a similar issue, I came across this same issue when i was trying to run a particular code snippet, shown below.
https://codepen.io/pcwanderer/pen/MMEREr
Looking at the error in the console for the above code.
Since the document.getElementById is returning a null and as null does not have a attribute named appendChild, therefore a error is thrown. To solve the issue see the code below.
https://codepen.io/pcwanderer/pen/pXWBQL
I hope this helps. :)