Created
January 14, 2010 18:11
-
-
Save nmerouze/277362 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function displayTweets(data) { | |
$("#loading").remove(); | |
$.each(data.results, function(i, item) { | |
$("#tweets").append($("<li/>").text(item.text)); | |
}); | |
} | |
$(function() { | |
$("#tweets").before($("<div id='loading'/>").text("Loading...")); | |
$.getJSON("http://search.twitter.com/search.json?q=from:nmerouze&rpp=5&callback=?", function(data) { | |
displayTweets(data); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<ul id="tweets"></ul> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function displayTweets(data) { | |
$("#loading").remove(); | |
$.each(data.results, function(i, item) { | |
$("#tweets").append($("<li/>").text(item.text)); | |
}); | |
} | |
$(function() { | |
$.getJSON("http://search.twitter.com/search.json?q=from:nmerouze&rpp=5&callback=?", function(data) { | |
displayTweets(data); | |
localStorage.setItem("tweets", JSON.stringify(data)); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<ul id="tweets"></ul> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function displayTweets(data) { | |
$("#loading").remove(); | |
$("#tweets").children().remove(); | |
$.each(data.results, function(i, item) { | |
$("#tweets").append($("<li/>").text(item.text)); | |
}); | |
} | |
$(function() { | |
$("#tweets").before($("<div id='loading'/>").text("Loading...")); | |
var tweets = localStorage.getItem("tweets"); | |
if (tweets != null) displayTweets(JSON.parse(tweets)); | |
$.getJSON("http://search.twitter.com/search.json?q=from:nmerouze&rpp=5&callback=?", function(data) { | |
displayTweets(data); | |
localStorage.setItem("tweets", JSON.stringify(data)); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<ul id="tweets"></ul> | |
<button onclick="javascript:localStorage.clear();">Clear localStorage</button> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> | |
<script src="modernizr.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
function displayTweets(data) { | |
$("#loading").remove(); | |
$("#tweets").children().remove(); | |
$.each(data.results, function(i, item) { | |
$("#tweets").append($("<li/>").text(item.text)); | |
}); | |
} | |
$(function() { | |
$("#tweets").before($("<div id='loading'/>").text("Loading...")); | |
if (Modernizr.localstorage) { | |
var tweets = localStorage.getItem("tweets"); | |
if (tweets != null) displayTweets(JSON.parse(tweets)); | |
} | |
$.getJSON("http://search.twitter.com/search.json?q=from:nmerouze&rpp=5&callback=?", function(data) { | |
displayTweets(data); | |
if (Modernizr.localstorage) localStorage.setItem("tweets", JSON.stringify(data)); | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<ul id="tweets"></ul> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment