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.

            
              <html>
  <title></title>
  <head>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  </head>
  <body>
   <!-- CocaCola Images/Qouts Generator-->
    <nav class="navbar navbar-default">
  <div class="container-fluid">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <div class="leftNavDiv">
      <a class="btn btn-danger" href="#">CocaCola</a>
      </div>
    </div>
      
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
    
  <div class="row">
  <div class="jumbotron">
  
  <div class="text-center">
       <em class="italic">Write your 'Qout'  here </br></em> 
    <h2 class="center"><input id="inputText" type="text"></h2>
    <em class="italic">Your 'Qout' will be generated here </br></em>
      <h3 class="apperGInText"></em></h3>
    <p><button id="buttonQG"class="btn btn-danger btn-lg" href="#">Generate your CocaCola "Quot"</button></p></div>
</div>
    <div class="col-md-12">
  <div class="jumbotron">
  
  <div class="text-center">
       <em class="italic">Click to generate your random 'Qout' here </br></em> 
    <em class="italic">Your 'Qout' will be generated here </br></em>
      <h4 id="apperGInText2" class="text-center"></h4>
    <p><button id="buttonQG2"class="btn btn-danger btn-lg" href="#">Click to Generate CocaCola "Quot"</button></p></div>
</div>
  <div>
    <div>
  <body>
</html>
            
          
!
            
              .leftNavDiv{
  margin-top:5px;
}
            
          
!
            
              var input="";
var quotes=[" What's great about this country is that America started the tradition where the richest consumers buy essentially the same things as the poorest. You can be watching TV and see Coca-Cola, and you can know that the President drinks Coke. Liz Taylor drinks Coke, and just think, you can drink Coke, too.</br>Andy Warhol",
            "I find Maersk fascinating. It is the Coca-Cola of freight with none of the fame. Its parent company, A. P. Moller-Maersk, is Denmark's largest company, its sales equal to 20 percent of Denmark's GDP; its ships use more oil than the entire nation.</br>Rose George","When I was an orphan, I was the richest kid at the orphanage because everyone else was complaining about not having anything. But when I discovered that you could get two cents for a Coca-Cola bottle, I would follow people around who were drinking it and ask them if they were almost through with it.</br> Wayne Dyer","I don't need to know how they make Coca-Cola. I think it tastes just fine not knowing what the ingredients are. I think there are some things that should be kept secret. </br>Colin Hanks"];
function getQuotes(){
   return Math.floor(Math.random() * quotes.length);
}
$(document).ready(function() {
  
  //prevent browser's default action
	//evt.preventDefault();
  $("#buttonQG").click(function()
   {
     input=$("#inputText").val();
     var timeAnimation=500;
     var apperGInText=$(".apperGInText");
   
    apperGInText.fadeOut(timeAnimation,function(){
         apperGInText.append('<p>'+input+'</p>');
         apperGInText.fadeIn(timeAnimation);
         $("#inputText").val('');
    });
     
    
    
     //$(".apperGInText").html("<h2>"+input+"</h2></br>");
   
  });
  $("#buttonQG2" ).click(function() {
    for(var i=0;i<=quotes.length;i++)
      {
        var randomGenarater=Math.floor(Math.random()*quotes.length)
        var apperGInText2=$("#apperGInText2");
        var quoteSorcue=quotes[randomGenarater];
    var timeAnimation2=500;
    apperGInText2.fadeOut(timeAnimation2, function(){
        apperGInText2.html('');
      //if(quoteSorcue==undifined)
       // {
          apperGInText2.hide();
       // }
      //else{
				apperGInText2.append('<em>'+quoteSorcue+'</em>');
        //fadein animation.
        apperGInText2.fadeIn(timeAnimation2);
      // }
        
      });
      }
 });
  
});
            
          
!
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.
Loading ..................

Console