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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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="col-xs-4"></div>
<!-- Bender doesn't play well with text -->

<div class="col-xs-8">

    <h1> Search Wikipedia Articles</h1>

  <div class="row">
    <input type="text" placeholder="Whaddya want?" id="wikiMe"></input>
    <button type="submit" class="btn btn-primary btn-md" id="pushMe">Brain the size of a planet...</button></div>

  <div class="row"><a href="" target="_blank"><button class="btn btn-warning" id="random">I know what you really want, click me! </button></a>

  <div class="well">
    <em><p>Displaying first 10 results only</p></em>

  <div class="footer"><button class="btn btn-danger" id="boom">Don't push me!!</button></div>


                body {
  background-color: black;
  background-image: url("");
  background-repeat: no-repeat;
  background-attachment: fixed;
h1 {
  color: #b16820;
  text-align: left;
h2 {
  color: #b16820;
p {
  color: white;
  pull: left;
input {
  height: 34px;
  border-radius: 5px;
  float: left;
.well {
  background-color: transparent;
  display: none;
  border: hidden;
#random {
  display: none;
#pushMe {
  float: left;
.btn-warning {
  float: left;
#boom {
  display: none;



                var search = "",
  url = "",
  data = [""],
  results = {},
  load = 0;

//Why does the information travel down the page each time you search?
//Add buttons to transform the page into different robots

function Wiki() {
  search = document.getElementById("wikiMe").value;
  url =
    "" +
    search +

  function wikiSlam(url) {
    var xmlHttp = new XMLHttpRequest();
    xmlHttp.onreadystatechange = function() {
      if (xmlHttp.readyState == 4 && xmlHttp.status == 200)
        data = JSON.parse(xmlHttp.responseText);
      results.title = data[1];
      results.summary = data[2]; = data[3];

      if ((load = 1)) {
        $(".well").html("<em>Displaying first 10 results only</em>");

      function display() {
        for (var i = 0; i < results.title.length; i++) {
            "<a href='" +
    [i] +
              "' target='blank'><h2>" +
              results.title[i] +
              ": </h2></a><blockquote><p>" +
              results.summary[i] +
          $("p").css("class", "lead");
          $(".well").css("display", "inline");
          $("#random").css("display", "inline");
          $("#boom").css("display", "inline");
          load = 1;
        (data = [""]), (results = {});
    };"GET", url, true); // true for asynchronous

$("#pushMe").click(function() {

$("#wikiMe").keypress(function(e) {
  if (e.which == 13) {

$("#boom").click(function() {
  $("html").addClass("animated hinge");
  alert("I warned you!!");