css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <link href='https://fonts.googleapis.com/css?family=Montserrat|Poiret+One' rel='stylesheet' type='text/css'>

<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>

<div class="row-fluid text-center" id="containing">
    <h1>Random Fitness Quotes...</h1>
    <h3>..to get you inspired or just make you feel hopeless.</h3>
    <button onclick="randomQuote()">Get A Quote</button>
    <div id="quote-display"></div>
  <a href="https://twitter.com/share" class="twitter-share-button" data-via="babzcraig" data-size="large" data-hashtags="FitnessQuotes">Tweet</a>

              body {
  background-color: #f39c12;
  padding-bottom: 50px;

#containing {
  margin-top: 130px;

h1 {
  font-family: Montserrat;
  font-size: 80px;
  color: #fff;

h3 {
  font-family: Montserrat;
  font-size: 25px;
  color: #dee;

button {
  width: 400px;
  height: 80px;
  margin-top: 50px;
  border-radius: 30px;
  color: #eee;
  font-family: Poiret One;
  font-size: 25px;
  background-color: #8e44ad;
  border: 0px;
  border-style: none; 

#quote-display {
  margin: 0 auto;
  margin-top: 50px;
  width: 70%;
  padding: 20px;
  height: 100px;
  font-family: Montserrat;
  font-size: 18px;
  color: #eee;
  border-radius: 20px;
  background-color: #d17c52;
  box-shadow: 0px 4px 0px 3px #c07c32 inset;

.twitter-share-button {
  margin-top: 20px;
              $("button").click(function() {
    $(this).toggleClass("animated shake")
    var $this = $(this);
    setTimeout(function() {
      $this.removeClass('animated shake');
    }, 800);

var myArray = [

"The human body is the best work of art. ― Jess C. Scott",

"A fit, healthy body—that is the best fashion statement. ― Jess C. Scott",

"The individual who says it is not possible should move out of the way of those doing it. ― Tricia Cunningham",

"A bear, however hard he tries, grows tubby without exercise. - A.A. Milne, Winnie-the-Pooh?",

"Exercise is a dirty word. Every time I hear it I wash my mouth out with chocolate. ― Charles M. Schulz",

"A stationary bike is a device that epitomizes the phrase 'hurry up and wait.' ― Jarod Kintz",

"I’m so unfamiliar with the gym, I call it James! ― Ellen DeGeneres",

"Get comfortable with being uncomfortable! ― Jillian Michaels",

"The reason fat men are good natured is they can neither fight nor run. ― Theodore Roosevelt",

"Regarding the fitness craze: America has lost its soul; now it’s trying to save its body. ― George Carlin, Brain Droppings",

function randomQuote() {
    var m = Math.floor((Math.random() * 10));
    var result = myArray[m];
    document.getElementById("quote-display").innerHTML = result;  

🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................