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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

              <div class="quote-box">
      <h3>Simple <i class="fa fa-wikipedia-w"></i>ikipedia Viewer</h3>
        <button class="btn button">
    <a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank">
    Click here for a random Wikipedia page!
        <br><br> or search for a keyword of your choice below!
        <div class="input-group">
            <input id="txt-search" type="text" class="form-control" placeholder="search on Wikipedia..." value="" />
            <span id="btn-search" class="btn input-group-addon">
        <i class="fa fa-search"></i>
    <div id="search-results">

<div class="footer"> by <a href="https://id.linkedin.com/in/jacky-efendi-094643a1">jackyef</a>
    <a href="https://id.linkedin.com/in/jacky-efendi-094643a1" target="_blank"><button class="button btn "><i class="fa fa-linkedin"></i></button></a>
    <a href="https://instagram.com/_u/jackyef_"><button class="button btn " target="_blank"><i class="fa fa-instagram"></i></button></a>
    <a href="https://facebook.com/zhouyongchao"><button class="button btn " target="_blank"><i class="fa fa-facebook"></i></button></a>

              @import url(https://fonts.googleapis.com/css?family=Raleway:400,500);
* {
  margin: 0;
  padding: 0;
  list-style: none;
  vertical-align: baseline;

div {
  position: relative;
  z-index: 2;

body {
  background-color: #333;
  color: #333;
  font-family: 'Raleway', sans-serif;
  font-weight: 400;

.footer {
  width: 450px;
  text-align: center;
  display: block;
  margin: 15px auto 30px auto;
  font-size: 0.8em;
  color: #fff;
.footer a {
  font-weight: 500;
  text-decoration: none;
  color: #fff;

.quote-box {
  border-radius: 3px;
  box-shadow: 3px;
  position: relative;
  margin: 2% auto auto auto;
  width: 450px;
  padding: 40px 50px;
  display: table;
  background-color: #fff;
.quote-box .quote-text {
  text-align: center;
  width: 450px;
  height: auto;
  clear: both;
  font-weight: 500;
  font-size: 1.75em;
.quote-box .quote-text i {
  font-size: 1.0em;
  margin-right: 0.4em;
.quote-box .quote-author {
  width: 450px;
  height: auto;
  clear: both;
  padding-top: 20px;
  font-size: 1em;
  text-align: right;
.quote-box .buttons {
  width: 450px;
  margin: auto;
  display: block;
.quote-box .buttons .button {
  height: 38px;
  border: none;
  border-radius: 3px;
  color: #fff;
  background-color: #333;
  outline: none;
  font-size: 0.85em;
  padding: 8px 18px 6px 18px;
  margin-top: 30px;
  opacity: 1;
  cursor: pointer;
.quote-box .buttons .button:hover {
  opacity: 0.9;
.quote-box .buttons .button#tweet-quote, .quote-box .buttons .button#tumblr-quote {
  float: left;
  padding: 0px;
  padding-top: 8px;
  text-align: center;
  font-size: 1.2em;
  margin-right: 5px;
  height: 30px;
  width: 40px;
.quote-box .buttons .button#new-quote {
  float: right;

  font-weight: 600;
  background-color: #555;
.btn.button a{
  color: #eee;
              var url = 'https://en.wikipedia.org/w/api.php?action=opensearch&format=json&callback=?&search=';

var keyword;
function search(){
  keyword = $('#txt-search').val();
  url = 'https://en.wikipedia.org/w/api.php?action=opensearch&format=json&callback=?&search=';
  url = url + keyword;
  $.getJSON(url, function(json){
      //json[0] contains the keyword entered 
    //json[1] contains every matching entries' titles
    //json[2] contains every matching entries' summary
    //json[3] contains every matching entries's URL
    var count = json[1].length;
    var i = 0;
    //clear search results
    $('#search-results').append("Keyword: " + keyword);
    $('#search-results').css('opacity', 0);
    var out;
    while(i < count){
      out = '';
      out += '<h3><a href=\"'+json[3][i] +'\" target=\"_blank\">'+ json[1][i] +'</a></h3>';
      out += '<p>'+json[2][i]+'</p>';
        opacity: 1
      }, 500);

$(document).ready(function() {
  $('#btn-search').on('click', search);
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................