Please see this solution. I have a similar error. But I didnt understand the first comment under 1st solution in it which says
Thanks John. If I take the same code and point it to http://api.wunderground.com/api/8ac447ee36aa2505/geolookup/conditions/q/IA/Cedar_Rapids.json' then the response does have the jQueryxxxx() wrapped around the json data, the code runs fine, and I get the 'Success' alert. I can't change the way the remote server serves up the JSON file. If I use dataType: 'json' then I get XMLHttpRequest cannot load isohunt.com/js/json.php?ihq=test. Origin localhost:8888 is not allowed by Access-Control-Allow-Origin
How to make the code point to the url he mentioned and how does this solve the problem? Any help would be appreciated. BTW, mine is a localhost url. I am working with retrieving data from elasticsearch and drawing google charts.