Skip to content

Commit

Permalink
Adds place for index to show errors if it fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Higginbotham authored and Samuel Higginbotham committed Apr 1, 2013
1 parent ceb3720 commit 199d87e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions index.html
Expand Up @@ -6,6 +6,7 @@
<h1>Twitter Search</h1> <h1>Twitter Search</h1>
<input id="query"> <input id="query">
<button id="btn">Search</button> <button id="btn">Search</button>
<div id="errors"></div>
<ul id="results"></ul> <ul id="results"></ul>
<script id="tweets" type="text/html"> <script id="tweets" type="text/html">
<li> <li>
Expand Down
4 changes: 2 additions & 2 deletions twitter-search.js
Expand Up @@ -12,8 +12,8 @@ function search(){
}) })
}) })
.fail(function(data){ .fail(function(data){
var error = "Sorry, there is something wrong. Please try again in a bit. Thanks for your patience!" var error = $('<p>').text("Sorry, there is something wrong. Please try again in a bit. Thanks for your patience!");
$('#error').append(error); $('#errors').append(error);
}) })
} }


Expand Down

0 comments on commit 199d87e

Please sign in to comment.