var TwitSearch = function(){ return { displayResults: function(tweets){ var updateStr = ""; $(tweets).each(function(index, tweet) { updateStr += "
  • " + tweet.user + " profile image" + "

    " + tweet.text + "

    " + "

    " + tweet.user + "

    " + "

    " + tweet.postedAt + "

    "; }); $("#results").html(updateStr); }, searchFailure: function(response){ $("#results").html("

    Oops. Something went wrong.

    "); }, cleanup: function(){}, rateLimitReached: function(){ console.log("rate limited"); }, failWhale: function(){ $("#results").html(""); } } }();