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.


                <html >
  <meta charset="UTF-8">
  <script src=""></script>
  <link rel="stylesheet" href="css/style.css">

    <link rel='stylesheet prefetch' href=''>
  input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: searchfield-cancel-button;

  <div class="container">
  <div class="mo-title mo-box text-center">
        <button id="mo-random" class="btn btn-primary mo-button"> Random!
  <div class="form-group">
    <input type="search" class="form-control" placeholder="Search" id="search" />
<div class="mo-results">
 <div class="mo-credit mo-box text-center">
  by <a href="">Mark Daniel Osborne</a>

<div class="mo-log">

    <script src="js/index.js"></script>





  background: #66AAFF;
    border-radius: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
    padding:0 15px 0 15px;

    font-family:  sans-serif;
    font-size: 50px;
    padding:10px 15px 10px 15px;


    background-size: 100px;
    background-repeat: no-repeat;
     background-position: center;



    font-family:  sans-serif;
    font-size: 15px;


#searchClear {
    position: absolute;
    right: 5px;
    top: 0;
    bottom: 0;
    height: 14px;
    margin: auto;
    font-size: 14px;
    cursor: pointer;
    color: #CCC;



    border-radius: 8px;
    margin-top: 15px;
    padding:10px 15px 10px 15px;


    font-size: 25px;  


Button for random wikipedia entry
Search field
Show results


Objective: Build a app that is functionally similar to this:

Fulfill the below user stories. Use whichever libraries or APIs you need. Give it your own personal style.

User Story: I can search Wikipedia entries in a search box and see the resulting Wikipedia entries.

User Story: I can click a button to see a random Wikipedia entry.

Hint #1: Here's a URL you can use to get a random Wikipedia article: var popup = $"about:blank", "_blank");

Hint #2: Here's an entry on using Wikipedia's API:

Hint #3: Use this link to experiment with Wikipedia's API:


var randomWiki = function () {
  var win ='', '_blank')
  if (win) {
      //Browser has allowed it to be opened
  } else {
      //Browser has blocked it
      alert('Please allow popups for this website')
  var searchWiki = function(searchTerm) {
    addLog("Searching Wiki for "+searchTerm)
       // .getJSON(url,data,success)
   // jHXR .done, .fail, .always
  addLog("Running getJSON...");
  var CORS = ""
  var wikiURL = CORS+""
  $.getJSON( wikiURL,{ action: 'query', list: 'search', srsearch: searchTerm, format: 'json' },
       addLog("Done 1...");  
       for (var result of search) {
         var resultLink = ""+result.title
         var resultBlock = "<a href=\""+resultLink+"\" target=\"_blank\">"
         resultBlock += "<div class=\"mo-result-box\"><p class = \"mo-result-title\"><b>"+result.title+"</b></p>"
         resultBlock += result.snippet

         resultBlock+="</div></a> "
     //function() {addLog("Done 2...");}
         function( jqXHR, textStatus, errorThrown )
          var errText = "Fail...<BR>"+textStatus+"<BR>"+errorThrown+"<BR>"
    //function() {addLog("Always...");}

$(document).ready(function() {
  addLog("Document Ready")

  )// addeventlistener
    if ((e.keyCode || e.which) == 13) {


var addLog = function(msg) {