cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div id="home" class="container-fluid bg-1 text-center">
  <h1>Wise Quote Generator</h1>
  <p><img  src="https://upload.wikimedia.org/wikipedia/commons/3/39/GoldFlwr3.gif"/></p>
  <blockquote>
    <p id ="quoteBody">"This won’t be our last acquisition"</p>

    <p><small id ="author">Tim Mahlman</small></p>

  </blockquote>
  <div>
    <p>
    <button id="generator" class="btn btn-default" onclick="generateQuote()">Another kernel of wisdom</button>
    </p>
    <p>
      <button class="btn btn-default" onclick="tweetIt()"><i class="fa fa-twitter"></i> Tweet it </button>   </p>
    <footer class="footer">
    Hanna Hourani - 2016
    </footer>
            
          
!
            
              h1 {
  font-family: Lobster, Monospace;
  
}



.footer{
  
  color:gray;
  background-color:#ADD8E6;
  height:40px;
  margin-top:50px;
  text-align:center;
}
            
          
!
            
              var myQuotes = ["Hanna@Such is life", "Denise@Hannaaaaaaaa", "Lemlem Elias@Yes madam", "Elie@Why Mr. Joe Maalouf? why Mr. Marcel? What is your policy?","Michel@Check after this week with telemetry","Elie@Walla ya mich, after that politic I will never watch it again"];
  
$('#generator').click(function(){
 quote = myQuotes[Math.floor(Math.random()*(myQuotes.length))
].split("@");
  $('#author').text(quote[0]);
  $('#quoteBody').text("\""+quote[1]+"\"");
 
  
});
function tweetIt () {
  var phrase = document.getElementById('quoteBody').innerText +" -"+ document.getElementById('author').innerText;
  var tweetUrl = 'https://twitter.com/share?text=' +
    encodeURIComponent(phrase) +
    '.' +
    '&url=' +
    'http://www.hannahourani.com/';
    
  window.open(tweetUrl);
}

            
          
!
999px
Loading ..................

Console