Skip to content

Commit

Permalink
There really is no need to load the Google jsapi and jQuery to do this.
Browse files Browse the repository at this point in the history
  • Loading branch information
zpao committed Jan 29, 2010
1 parent c495b37 commit 7982b31
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,15 @@
}
</style>

<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[

google.load("jquery", "1.4");

google.setOnLoadCallback(function() {
window.onload = function() {
var response = (Math.random() < 0.5) ? "NO" : "YES";
window.setTimeout(function() {
jQuery('#answer').html(response);

setTimeout(function() {
document.getElementById("answer").innerHTML = response;
}, 2000);

});
}
//]]>
</script>

Expand Down

0 comments on commit 7982b31

Please sign in to comment.