Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <div class="container-fluid">
  <div class="row">
    <div class="col-md-4">
      
    </div>
    <div class="col-md-4 display">
      <form>
        <div class="form-group">
    <label for="exampleInputEmail1">Wikipedia</label>
    <input type="search" class="form-control" id="searchBox" aria-describedby="emailHelp" placeholder="Search text goes here">
          <!-- <button  id="btn" class="btn btn-info">X
          </button> -->    <small id="emailHelp" class="form-text text-muted">Hit enter to search</small>
      <a target="_blank" href="https://en.wikipedia.org/wiki/Special:Random"> <small id="emailHelp" class="form-text text-muted text-info pull-right">Get a random article</small>  </a> 
  </div>
      </form>
    </div>
    <div class="col-md-4">
      
    </div>
  </div>
  <div class="row">
    <div class="col-md-2"></div>
    <div class="col-md-8 data " id="list-items">
      
     <!--  <div class="panel panel-primary">
  <div class="panel-heading">Panel heading without title</div>
  <div class="panel-body">
    Panel content
  </div>
</div> -->
    </div>
    <div class="col-md-2"></div>
  </div>
</div>
              
            
!

CSS

              
                body{
  /* background-position: top center; */
  background-image:url('http://blog.heartland.org/wp-content/uploads/2016/02/Wikipedia-Logo.jpg');
  background-size:cover;
  /* background-width:100%; */
  /* background-repeat: no-repeat; */
  background-attachment:fixed;
  /* width:100%; */
  
}
.searchHeader{
  align:center;
}
.list-item{
  border:1px solid;
  border-left:4px solid;
  /* border-color:grey;
  border-type:solid; */
  
}
.title{
  font-size:2em;
  /* background-color:orange; */
  padding:2px;
  color:black;
}
.description{
  padding:4px;
  font-style:verdana;
  font-size:1.2em;
}
.panel{
  opacity:0.9;
}
a{
  text-decoration: none;
}
              
            
!

JS

              
                $("document").ready(function() {
  $("#searchBox").on("keypress", function(e) {
    //var txt1 = "<p>Text.</p>";
    //$("#list-items").append(txt1);
    if (e.which == 13) {
      e.preventDefault();
      getData();
    }
    
  });
  function getData() {
    var searchKey = $("#searchBox").val();

    var playListURL =
      "https://en.wikipedia.org/w/api.php?action=opensearch&search=" +
      searchKey +
      "&limit=10&format=json&callback=?";
   /*  $.ajax({
      type: "GET",
      data:{'origin':'*'},
      url: playListURL,
      dataType: "json",
      async: false,
      success: function(data) {
        console.log(data);
       $(".data").html("");
        var len=data[1].length;
        console.log(len);
        for(var i=0;i<len;i++){
          // $('.data').append('<a href='+data[3][i]+
                         //      'target="blank"><b>'+'<br>'+data[1]
                         //
                         [i]+'</b>'+'</a><br>'+data[2][i]+'<br>'); class="animated bounce"
          var html =
          '<div class="animated slideInLeft" ><a target="_blank" href=' +
          data[3][i] +
          '><div class="panel panel-primary">' +
          '<div class="panel-heading">' +
          data[1][i] +
          "</div>" +
          '<div class="panel-body">' +
          data[2][i] +
          "</div>" +
          "</div></a></div>";

        $(".data").append(html);
       }
      }
    }); */

   var dfdObj = $.getJSON(playListURL);
    dfdObj.done(function(data) {
      $(".data").html("");
      var len = data[1].length;
      //alert(len);
      var x = 0;
      for(var i=0;i<len;i++){
        var html =
          '<a target="_blank" style="text-decoration:none" href=' +
          data[3][i] +
          '><div class="panel panel-primary">' +
          '<div class="panel-heading">' +
          data[1][i] +
          "</div>" +
          '<div class="panel-body">' +
          data[2][i] +
          "</div>" +
          "</div></a>";

        //$(".data").append(html);
        $(html).hide().appendTo(".data").delay(400*i).fadeIn(1000,"swing");

      } //alert($("#list-items").html());
      });
    

    dfdObj.fail(function() {
      alert("Ajax failed");
    });

    dfdObj.always(function() {
      //alert("alleo");
    });
  
  }
});

              
            
!
999px

Console