[Solved] What's wrong with my code please ? Wikipedia Viewer Challenge

[Solved] What's wrong with my code please ? Wikipedia Viewer Challenge
0

#1

Hi everyone,

I have a problem geting json, someone could tell me what’s wrong in my code please?

Thanks a lot

Here’s my codepen’s link: My Wikipedia Viewer challenge


#2

There’s this error message:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://fr.wikipedia.org/w/api.php?action=opensearch&format=json&search=magic&utf8=1. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

The fix for the Wikipedia API is as easy as adding origin=* in the URL parameters.

(Off-topic, but bootstrap.js should be loaded after jQuery)


#3

A very big thanks to you ! :muscle: