title: ajax erro function not working
body: <pre><code>function getWikiData(marker)  {
  
      var wikiurl = "https://en.wikipedia.org/w/api.php?
  action=opensearch&amp;search=" +
        marker.title + "&amp;format=json&amp;callback=wikiCallback";
  
      $.ajax({
  
        url: wikiurl,
        dataType: "jsonp",
        // jasonp: "callback",
        success: function(response) {
          var summary = response[2][0];
          var article = response[3][0];
          var articleUrl = article;
  
          console.log(response);
          console.log(response[2][0]);
          console.log(response[3][0]);
  
  
          self.infoWindow.setContent('&lt;h2&gt;' + marker.title + '&lt;/h2&gt;&lt;p&gt;' + 
  summary + '&lt;/p&gt;' + '&lt;a title="go to wikipedia article" href="' + articleUrl 
  + '"&gt;&gt; go to wikipedia article&lt;/a&gt;'); self.infoWindow.open(map, marker);
        }
  
      })
  
  
      error: function(){
            alert("An Error Occurred Loading Wikipedia Article. Please try 
  again later")
      };
  
  
  
  }
  </code></pre>
  
  <p>I'm trying to add error function to my ajax </p>
  
  <p>Console.log error</p>
  
  <p>script.js:255 Uncaught SyntaxError: Unexpected token (</p>
  
  <p>line 255 would be error:function(error){
  not sure why it won't read my code.</p>