LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code

Wealth is the product of man's capacity to think.
Tweet Quote
CSS
body {
  height: 100vh;
  text-align: center;
  background: url("http://i1082.photobucket.com/albums/j361/ruoppolo25/background-texture-1014963_640.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  width: 102%;
}
h1 {
  font-family: "Anton";
  font-weight: 500;
  text-align: center;
  padding-top: 10%;
  text-shadow: 4px 4px 4px #aaa;
  color: black;
}
p{
  font-family: Monospace;
  text-align:center;
  font-size: 18px;
  color: black;
}
#ayn-image {
  border-radius: 80px;
}
.buttons  {
  padding-top: 1%;
}
.random-quote {
  font-family: "Indie Flower";
  font-size: 42px;
  color: black;
  padding-top: 15%;
}
JS
$(document).ready(function() {
    
  function generateQuote() {
    var quotes = [
             "Honest people are never touchy about the matter of being trusted.", 
  "To achieve, you need thought. You have to know what you are doing and that's real power.",
  "Common sense is a simple and non-self-conscious use of logic.",
  "A creative man is motivated by the desire to achieve, not by the desire to beat others.",
  "The purpose of morality is to teach you, not to suffer and die, but to enjoy yourself and live.",
  "The smallest minority on earth is the individual. Those who deny individual rights cannot claim to be defenders of minorities.",
  "Money is only a tool. It will take you wherever you wish, but it will not replace you as the driver."
,
  "Only the man who does not need it, is fit to inherit wealth, the man who would make his fortune no matter where he started."
  ,
  "Every man builds his world in his own image. He has the power to choose, but no power to escape the necessity of choice.",
  "The only power any government has is the power to crack down on criminals. Well, when there aren't enough criminals, one makes them.",
      "To achieve, you need thought. You have to know what you are doing and that's real power.",
      "God... a being whose only definition is that he is beyond man's power to conceive."
 ];
    var quoteN = Math.floor(Math.random() * quotes.length);
    $(".random-quote").text(quotes[quoteN]);
  }
  
  function generateTweet() {
    $("#tweetQuote").attr("href", "https://twitter.com/intent/tweet?text=" + $(".random-quote").text() + " - Ayn Rand @matavic" );
    window.open($("#tweetQuote").attr("href"), _blank);
  }
  
  $("#newQuote").on( "click", function() {
    generateQuote();
});
  
  $("#tweetQuote").on( "click", function() {
    generateTweet();
});
  
});
Fri, 01/12/2018 - 23:40

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv