Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added error handling.

  • Loading branch information...
commit a883b005b74b51813d84f1ae09c704ffee521edd 1 parent 16bda57
@rishabhsrao authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 js/main.js
View
4 js/main.js
@@ -18,7 +18,7 @@ jQuery(document).ready(function() {
self.getItems = function() {
jQuery.ajax({
- url: "http://www.tastekid.com/ask/ws",
+ url: "http://www.tastekid.com/ask/wsa",
type: "GET",
dataType: "jsonp",
async: true,
@@ -58,6 +58,8 @@ jQuery(document).ready(function() {
});
self.items.push(item);
}
+ } else {
+ console.error("No data fetched from server.");
}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.