if(e.which == 13) {
var search_text = ($("#search_box").val());
$.ajax({
url: "https://en.wikipedia.org/w/api.php",
type: "GET",
data: {action: "opensearch",search:search_text, format:"jsonp"},
success: function(data){
console.log(JSON.stringify(data));
}
});
Getting the typical “No ‘Access-Control-Allow-Origin’ header is present on the requested resource.” error. Any suggestions on resolving it? Have read and searched a lot. Now i’m asking.
I whole-heartedly believe this should be a topic addressed more closely in the FCC curriculum. This single error has been the biggest difficulty in all of my intermediate projects so far.