cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>


  <main class="container-fluid text-center">
    <h1>Aaron's Wiki Viewer</h1>
    <h4>Free Code Camp Front End Development Project</h4><br><br>
    <a class="btn btn-info" href="https://en.wikipedia.org/wiki/Special:Random" target="_blank" id="randQ">Click here for a random article!</a><br><br>
    <div class="input-group margin-bottom-sm col-sm-4 col-sm-offset-4">
      <input id="searchBar" class="form-control" type="text" placeholder="Search Wikipedia!">
      <button id="searchBtn"><i class="fa fa-search fa-fw"></i></button>
    <button id="openSearch"><span class=""><i id="magx"class="fa fa-search fa-fw"></i></span></button>
    <div class="row">
      <ul id="output" class="list-unstyled text-left"></ul>

              @import url("https://fonts.googleapis.com/css?family=Francois+One");
html, body, main {
  background: url('https://source.unsplash.com/Q1p7bh3SHj8') no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  color: white;
  font-family: 'Francois One', sans-serif;
  padding: 10px;

main h1 {
  font-size: 60px;
  color: white;

#randQ {
  color: white;
  font-size: 30px;
  box-shadow: 4px 4px 0 0 #007299;

#randQ:active {
  box-shadow: none;
	margin-bottom: -3px;
	margin-top: 3px;

#searchBar {
  float: right;

#openSearch {
  border-radius: 50%;
  padding: 20px;
  color: black;

.hidden {
  display: none;

ul .jumbotron {
  background-color: silver;
  color: black;
  padding: 10px;

ul h3 {
  font-size: 15px;

              $(document).ready(function () {
    var search = false;


    $('#openSearch').click(function () {
      if (search === false) {
        search = true;
      else if (search === true) {
        search = false;

    $('#searchBtn').click(function() {
      var searchTerm = $('#searchBar').val();
      var url = 'https://en.wikipedia.org/w/api.php?action=opensearch&search='+searchTerm+'&format=json&callback=?';

        dataType: 'json',
        success: function(data){

          for (var i = 0; i < data[1].length; i++) {
            if (i%2 == 1) {
              $("#output").prepend("<div class='col-xs-6'><div class='jumbotron'><li><a href="+data[3][i]+" target='_blank'>"+"<h2>"+data[1][i]+"</h2>"+"</a><p><h3>"+data[2][i]+"</h3></p></li></div></div>");
            else if (i%2 == 0) {
              $("#output").prepend("<div class='row'><div class='col-xs-6'><div class='jumbotron'><li><a href="+data[3][i]+" target='_blank'>"+"<h2>"+data[1][i]+"</h2>"+"</a><p><h3>"+data[2][i]+"</h3></p></li></div></div></div>");

        error: function(error){

    $('#searchBar').keypress(function(e) {
      if(e.keyCode == 13){//Enter key pressed
            $('#searchBtn').click();//Trigger search button click event
Loading ..................