Permalink
Browse files

Add button to main page that randomly fetches a new quote.

  • Loading branch information...
1 parent 8e219cb commit bd0e0ecec1e4fe335ee0febf9837ca582397d8a2 @anthonydb committed Jun 19, 2012
Showing with 9 additions and 0 deletions.
  1. +6 −0 quotes/templates/quotes_base.html
  2. +3 −0 quotes/templates/quotes_home.html
@@ -21,6 +21,12 @@
$(".inline").colorbox({inline:true, width:"500px"});
});
</script>
+ <script type="text/javascript">
+ function showBtn() {
+ document.getElementById("reloadr").style.visibility = "visible";
+ }
+ setTimeout("showBtn()", 4000); // 1000 = 1 sec
+ </script>
<title>Words on Art {% block title %}{% endblock %}</title>
<meta name="description" content="{% block description %}{% endblock %}">
</head>
@@ -33,5 +33,8 @@
<p>{{ random_quote.source }}</p>
</div>
</div>
+ <div id="reloadr" style="visibility: hidden">
+ <input class="button" type="submit" onclick="window.location.reload();" value="Fetch Another">
+ </div>
</div>
{% endblock %}

0 comments on commit bd0e0ec

Please sign in to comment.