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 = "wrapper">  
  <div class = "container-fluid text-center"> <h2> wiki portal </h2> </div>
  <div class = "container-fluid text-center random"> Click here for a random article  </div> 
  <div class = "container-fluid text-center"> -or-  </div> 
<div class = "container-fluid text-center"> 
  <form class="navbar-form" role="search">
    <div class="input-group">
     <input type="text" class="form-control" placeholder="Search" value="" name="srch-term" id="srch-term">
       <div class="input-group-btn">
        <button class="btn btn-default searchBtn" type="submit">
          <span class="glyphicon glyphicon-search"></span>
  <div class = "container-fluid data">  </div>
  <footer class='container-fluid text-center'> written by ww </footer>


                body {
  margin: 50px;
.random {
  margin-top: 10px;
  margin-bottom: 10px;
.form-control {
  margin-bottom: 1em;
.shadow {
  -moz-box-shadow:    3px 3px 5px 6px #ccc;
  -webkit-box-shadow: 3px 3px 5px 6px #ccc;
  box-shadow:         3px 3px 5px 6px #ccc;
.shadow:hover {
  -moz-box-shadow:    5px 5px 7px 8px #ccc;
  -webkit-box-shadow: 5px 5px 7px 8px #ccc;
  box-shadow:         5px 5px 7px 8px #ccc;


                var counter;

function hover(){
      $(".random").mouseover(function() {
      $(".random").css('color', 'blue');
      .mouseout(function() {
      $(".random").css('color', 'black');

function randomWiki(){
var randomWiki = "";;

function userWiki(search){
  var counter;
  var wikiEndPoint = ""
  var url = "/w/api.php?action=opensearch&format=json&origin=*&search=" + search;
  type: 'GET',
  dataType: 'json',
  url: wikiEndPoint + url,
  success: function( data ) {
    var html = "";
    var blank = "";
    counter = data[1].length;
    for(var i = 0; i < counter; i++){
         html += "<div class = 'articleContainer article" + i + " shadow'>";
      for(var j = 1; j < data.length; j++){
        if (data[j] === data[1]) {
          html+= "<h3>" + data[j][i] + "</h3>"
        } else if (data[j] === data[2]){
          html += "<p>" + data[j][i] + "</p>";
          if (data[j][i] === blank) {
            html += "<p>" + data[j][i] + "Click Here for more information" + "</p>";
        } else if (data[j] === data[3]) {
          html += "<a href=" + data[j][i] + ">" + "</a>";
          html += "</div><br>";

    $(".articleContainer").css('background', '#f6f6f6');
    $(".articleContainer").css('padding', '1em');

   error: function(xhr, status, error) {
     console.log("status: " + status);
     console.log("error: " + error);
     console.log("xhr: " + xhr);
      cache: false //this is important

function userClick(counter){
  for (var i = 0; i < counter; i++ ){
     $('.article' + i).click(function(){
     return false;

$(document).ready(function (){
  var searchContent = $("#srch-term").val();
  searchContent = encodeURI(searchContent);