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 Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

Quick-add: + add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

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 class=" bg container text-center">
  <h1>Random Inspirational Qoute</h1>
    <p> A quick pick me up for your spirits</p>
  <div id ="buttons" >
    <div class="row">
      <div class = "col-md-1 col-md-offset-5">
  <button class =" newQ btn btn-success" type="submit">next</button></div>
        <div class = "col-md-1">
  <a href="#" class ="newT btn btn-info">Tweet</a>
  
        </div>
       </div>
    </div>

<div id ="statements" >
  <h3 class="qoute"></h3>
  <p class="author"></p>
</div>
  </div>
  
  
            
          
!
            
              body{background: url("https://s-media-cache-ak0.pinimg.com/originals/0b/7b/7f/0b7b7f15b83e7326de9078d0998d5eac.jpg")  no-repeat fixed;}
p,
h1,
h3
{ color:white;}
.bg{ background: rgba(47,79,79,.5);
margin: 0 auto;
border-right:5px solid #00FFFF;
  border-top:5px solid #00FFFF;}
#statements{
  margin:40px 0px;
  border: 3px solid #008080;
  background:black;
}

#buttons{
  margin-top:40px;
}
            
          
!
            
              $(document).ready(function() {
  var randomAuthors;
  var randomStatments;
  var randomNum;
 newStatements();

  function newStatements() {


   var statements = ["It is not in the stars to hold our destiny but in ourselves.", "Education is the passport to the future, for tomorrow belongs to those who prepare for it today.", "Even though the future seems far away, it is actually beginning right now."];
     
     var authors = ["-William Shakespeare", "-Malcolm X", "-Mattie Stepanek"];

     randomNum = Math.floor((Math.random()*statements.length));
     randomStatments = statements[randomNum];
     randomAuthors = authors[randomNum];

     $(".qoute").text(randomStatments);
     $(".author").text(randomAuthors);
  };

  $(".newT").on("click", function() {
    window.open("https://twitter.com/intent/tweet?text=" + randomStatments + ""+ randomAuthors);
  });

  $(".newQ").on("click", function() {
    newStatements();

  });

});
            
          
!
999px
Loading ..................

Console