I'm a beginner programmer/coder, and I've started doing the Local Weather app thing. When trying to get a piece of data from the API I've been struck with these errors (tried .getJSON() first):
1."Access to Font at '...' has been blocked by CORS policy".
2."Bootstrap tooltips require Tether."
3 ".XMLHttpRequest cannot load '...' No 'Access-Control-Allow-Origin' header is present on the requested resource."
Then I tried a workaround, using .ajax() with jsonp, but then I got hit with these errors:
1."Access to Font at '...' has been blocked by CORS policy".
2.Refused to execute script from '...' because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.
Now I have no idea what to do. Also, I was wondering, why the Tether error came up in the first example, because an hour ago I was not getting this error there and I'm still not getting it in the second example (the one with jsonp).
The .getJSON()
code: http://codepen.io/Kestvir/pen/Mmgzjz
The .ajax()
code: http://codepen.io/Kestvir/pen/oWvMBb