Permalink
Browse files

Adds place for index to show errors if it fails

  • Loading branch information...
1 parent ceb3720 commit 199d87ea5a86507c03c6e21b67690565dda938b1 Samuel Higginbotham committed Apr 1, 2013
Showing with 3 additions and 2 deletions.
  1. +1 −0 index.html
  2. +2 −2 twitter-search.js
View
@@ -6,6 +6,7 @@
<h1>Twitter Search</h1>
<input id="query">
<button id="btn">Search</button>
+ <div id="errors"></div>
<ul id="results"></ul>
<script id="tweets" type="text/html">
<li>
View
@@ -12,8 +12,8 @@ function search(){
})
})
.fail(function(data){
- var error = "Sorry, there is something wrong. Please try again in a bit. Thanks for your patience!"
- $('#error').append(error);
+ var error = $('<p>').text("Sorry, there is something wrong. Please try again in a bit. Thanks for your patience!");
+ $('#errors').append(error);
})
}

0 comments on commit 199d87e

Please sign in to comment.