123

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.

            
              <div class = "container">
  <div class = "row">
    <h1>Motivational Quotes!</h1>
    <h2>Here are some motivational quotes found online to keep you motivated! Enjoy!</h2>
  </div> 
  <div class = "row quote">
    <div class = "col-xs-20 message"> 
      The message goes here.
    </div>
    <div class = "col-xs-14 who">
    </div>
    <a href = "#"><button id = "twitterButton" class = "button2">
      Tweet!
    </button>
  </div>
  <div class = "row">
    <div class = "col-xs-14">
      <button id = "getMessage" class = "button">
        Generate Quote
      </button>
      </a>  
    </div>
  </div>
</div>

            
          
!
            
              body {
  text-align: center;
  background-image: url("http://wallpaper-gallery.net/images/landscape/landscape-3.png");
  background-size: 1980px 900px;
  background-repeat: no-repeat;
}

.button {
  height: 50px;
  width: 400px;
  margin: 20px auto;
  color: rgba(0,0,0,1); 
  font-size: 20px;
  border-radius: 25px;
  box-shadow: -5px 5px 10px;       rgba(100,100,100,.8);
}

.button2 {
  height: 25px;
  width: 200px;
  margin: 20px auto;
  color: rgba(1,0,0,1); 
  font-size: 20px;
  border-radius: 10px;
  box-shadow: -5px 5px 10px;       rgba(100,100,100,.8);
  background-color: #F70D2B;
}

.quote {
  font-family: serif;
  font-size: 1.5em;
  width: 700px;
  height: auto;
  margin: 0 auto;
  padding: 20px;
  border-radius: 15px;
  box-shadow: -5px 7px 5px;
  color: #000;
  rgba(100,100,100,.8);
}

.who {
  font-style: italic;
}


            
          
!
            
              $(document).ready(function() {
	generate();

  function generate(){ var theQuotes = ["Only I can change my life. No one can do it for me.+-Carol Burnett","Life is 10% what happens to you and 90% how you react to it.+-Charles R. Swindoll","Good, better, best. Never Let it rest. 'Til your good is better and your better is best.+-St. Jerome","Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.+-Thomas A. Edison","Optimism is the faith that leads to achievement. Nothing can be done without hope and confidence.+-Helen Keller","It always seems impossible until it's done.+-Nelson Mandela","Always do your best. What you plant now, you will harvest later.+-Og Mandino", "We aim above the mark to hit the target.+-Ralph Waldo Emerson", "With the new day comes new strength and new thoughts.+-Eleanor Roosevelt", "Setting goals is the first step in turning the invisible into the visible.+-Tony Robbins", "It does not matter how slowly you go as long as you do not stop.+-Confucius", "The past cannot be changed. The future is yet in your power.+-Unknown" ];
                      
var randomQuote = theQuotes[Math.floor(Math.random()*theQuotes.length)]; 
var quoteAuthor=randomQuote.split("+"); 
$('.message').text(quoteAuthor[0]); 
$('.who').text(quoteAuthor[1]);
                     }                      
$('#twitterButton').click(function() {
  window.open('https://twitter.com/intent/tweet?text=' + $('message').text() + " " + $('who').text());       
});
$(".button").on( "click", function() { generate(); 
  });
});
            
          
!
999px
🕑 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.

Console