Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="container text-center">
  <h1>Simon Game Trial</h1>
  <div id="game">
  <button id="red" class="color"></button>
  <button id="yellow" class="color"></button><br>
  <button id="green" class="color"></button>
  <button id="blue" class="color"></button></br>

  </div>
  <div id="controls">
<button class="btn btn-danger">New Game</button>
 <button class="btn btn-default">Strict Mode</button>
<button class="btn btn-success">On/Off</button>    

</div>
<div id="round">
<p>Round: </p>
</div>
</div>
              
            
!

CSS

              
                body{
  background-color:black;
  color:white;
  min-height:100%;
}
h1{
  margin:50px;
}
.color{
  width:300px;
  height:100px;
}
#red{
  background-color:red;
}
#green{
  background-color:green;
}
#yellow{
  background-color:yellow;
}
#blue{
  background-color:blue;
}
.btn{
  margin:20px;
  width:100px;
}
              
            
!

JS

              
                $(document).ready(function(){
  var array=[];
  var colorList =['red','yellow','green','blue'];
  var round =1;
  var count=0;
  var gameType;
  
  
}); // end ready
              
            
!
999px

Console