CodePen JSONp problems Wiki viewer

I was just testing my Wikiviewer in codepen and it is not working.
There seems to be a problem in the JSONp in Code pen. Is this a known Issue in Code pen?
The page works fine in my live server in Atom.
Also I have it live in plugin section in a app building platform.

Here is my project in code pen:

Also here is a working version live:

Should I be using a CORS method instead of JSONp for this project?
Any help or feedback of why this may not be working in code pen will be greatly appreciated.

Thank you,

Take a peak at your browser’s console (Ctrl+Shft+J in Chrome) of the Codepen, because you have an error you need to deal with first.

Codepen appends anything in your JavaScript section to the end of your body in the html, so those two addEventListeners will actually be above your JavaScript code. Move those down into the JavaScript section’s main code section and you should be good to go.

1 Like

Thank you so much for your help. You were spot on.