Wikipedia Viewer .getJSON help

Hey guys,

I’m having trouble with my getJSON method. I’ve tested the url, search value, and click function - they’re all behaving as expected (I believe), but I can’t seem to get my JSON data to return. I have a feeling I’m missing something obvious, but any help would be greatly appreciated.

$(document).ready(function() {
  var search;

  $("#search-button").on("click", function(event) {

    if ($("#search-box").val()) {
      search = $("#search-box").val();

        "" +
        function(data) {
          console.log("JSON data: " + JSON.stringify(data));

Add these two query parameters for CORS and JSON


Brilliant. Thank you!