9/11/2015 - 5:11 PM

Zipline: Random Quote Gen

Zipline: Random Quote Gen

body {
  padding: 20px;

div {
  width: 400px;
  margin: 0 auto;
  text-align: center;
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>

var rQuote = [
  'Life is about making an impact, not making an income. –Kevin Kruse', 
  'Whatever the mind of man can conceive and believe, it can achieve. –Napoleon Hill', 
  'Strive not to be a success, but rather to be of value. –Albert Einstein', 
  'Two roads diverged in a wood, and I—I took the one less traveled by, And that has made all the difference.  –Robert Frost', 
  'I attribute my success to this: I never gave or took any excuse. –Florence Nightingale', 
  'You miss 100% of the shots you don’t take. –Wayne Gretzky', 
  'I’ve missed more than 9000 shots in my career. I’ve lost almost 300 games. 26 times I’ve been trusted to take the game winning shot and missed. I’ve failed over and over and over again in my life. And that is why I succeed. –Michael Jordan', 
  'The most difficult thing is the decision to act, the rest is merely tenacity. –Amelia Earhart', 
  'Definiteness of purpose is the starting point of all achievement. –W. Clement Stone'

document.getElementById("button").addEventListener('click', function () {
  var n = Math.floor((Math.random() * 9));
  var text = document.getElementById('a');
  text.innerHTML = (rQuote[n]);
$("#target").click(function() {

<h2>Random Quote Generator</h2>
<input type="button" value="Click Me" id="button" />​

<p id='a'></p>

<span id="target">Tweet This Quote.</span>