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


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


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.


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.

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.


                <div class="container">
  <div class="row text-center afterMe">
    <div class="col-md-4"></div>
    <div class="col-md-4 v-align">
      <p><button class="btn btn-default btn-wiki" id="randomArticle"><i class="fa fa-question-circle-o" aria-hidden="true"></i> Random article</button></p>
      <p>Click icon to search or select random article above.</p>
      <h2><i class="fa fa-search fa-2" aria-hidden="true"></i><input type="text" id="search" class="search" /><a href="#" id="closeIcon">x</a></h2>
      <p><button class="btn btn-default btn-wiki" onclick="searchWikipedia();">Search <i class="fa fa-wikipedia-w" aria-hidden="true"></i>ikipedia!</button></p>
    <div class="col-md-4"></div>



                $grey: #DEE8EF
$orange: #E7983F
$teal: #26899E
$dark-grey: #3E4154
$brown: #948173

  color: $grey
  background-color: $teal
  font-size: 0.5em
  left: -20px
  position: relative
  color: $orange
  display: none
  text-decoration: none
  top: 0px
  color: $orange
  cursor: pointer
  font-size: 1.25em
  background-color: $grey
  color: $orange  
  margin-top: 10px
    color: $orange
    background-color: $dark-grey
  outline: none
  border-radius: 25px
  border: 5px $orange solid
  background-color: $teal
  display: none
  font-size: 0.50em
  margin: 0 0 10px 0
  padding: 15px 20px 15px 15px
  width: 25px
  height: 25px  
  margin: 0 0 25px 0
  text-align: left
  background-color: $dark-grey
  color: $grey
    color: $grey
    color: $grey
    color: $grey
    color: $grey    
    font-size: 1.75em
    font-weight: bold


    width: "200px"
  }, 500);

  if(event.which === 13){

    width: "25px"
  }, "slow", function(){
    $(".wikiResults").fadeOut("slow", function(){

function searchWikipedia(){
        url: "",
        jsonp: "callback",
        dataType: 'jsonp',
        data: {
          action: "query",
          list: "search",
          srsearch: $(".search").val(),
          srinfo: "suggestion",
          srlimit: "10",
          format: "json"
        xhrFields: {
          withCredentials: true
        success: function(data){
         var wikiToAppend="";
          for(var i=0;i<10;i++){
            wikiToAppend+="<a href='"+[i].title +"' target='_blank'><div class='row wikiResults'><div class='col-md-12'><h1 class='wikiTitle'>" +[i].title + "</h1><p class='wikiDesc'>" +[i].snippet + "</p></div></div></a>"
    $(this).css("border-left", "5px solid #DEE8EF");
    $(this).css("border-left", "0");