Wikipedia viewer - Free Code Camp
How do I make an wikipedia viewer - free code camp?
What is a wikipedia viewer - free code camp? How do you make a wikipedia viewer - free code camp? This script and codes were developed by Luis Ulua on 09 January 2023, Monday.
Wikipedia viewer - Free Code Camp - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Wikipedia viewer - Free Code Camp</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <section class="header"> <h1>WikiSeeks<h1> </section> <!-- Search section--> <section class="form-control"> <input type="search" class="search-input"/> <a href="https://en.wikipedia.org/wiki/Special:Random" target="_blank" class="random-btn">Random</a> </section> <section class="results"> <ul> </ul> </section>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Wikipedia viewer - Free Code Camp - Script Codes CSS Codes
.container { max-width: 1200px; width: 100%; height: 100vh; margin: 0 auto;
}
a { text-decoration: none;
}
section { text-align: center;
}
.header h1 { font-size: 4em;
}
.form-control { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center;
}
.form-control > .search-input { width: 50%; border: 1px solid #888; padding: 10px; outline: none; -webkit-transition: all 0.3s ease-in; transition: all 0.3s ease-in;
}
.form-control > .search-input:hover { border: 1px solid #222; box-shadow: 2px 2px 3px rgba(34, 34, 34, 0.4);
}
.form-control > .random-btn { width: 15%; padding: 10px; border: 2px solid #222; margin: 10px; color: #222; -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
}
.form-control > .random-btn:hover { padding: 10px; color: #fff; background: #222;
}
.results { width: 80%; height: 50px; padding: 10px; margin: 0 auto; text-align: left;
}
.results > li { width: 100%; background: #a32828; border-radius: 2px; padding: 10px; margin: 10px 0; list-style-type: none;
}
.results > lihover { border-left: 5px solid #222;
}
.results > li > a { color: #fff; font-size: 1.2em; text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.8); -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
}
.results > li > a:hover { text-shadow: 1px 2px 5px black;
}
.results > li > p { color: #f7f7f7;
}
Wikipedia viewer - Free Code Camp - Script Codes JS Codes
$(document).ready(function() { var $input = $('.search-input'); // search on 'enter' keypress event $(function() { $input.keypress(function(e) { var $val = $input.val(); if (e.keyCode == 13) { console.log($val); getSearch() } }); // End of keypress event }); // Anon function //\/\/\/\/\/\/\/\/\/\/\/\/\/\/\//\ function getSearch() { var $val = $input.val(); $.ajax({ url: 'https://en.wikipedia.org/w/api.php', dataType: 'jsonp', type: 'get', data: { action: 'opensearch', search: $val, format: 'json', utf8: 1, limit: 10, profile: 'classic', jsonp: 'callback' }, success: function(data) { var $results = $('.results'); $results.empty(); //console.log(data) for (var x = 0; x < data[1].length; x++) { var html = '<li>' + '<a href="https://en.wikipedia.org/wiki/' + data[1][x] + '"target="_blank">' + data[1][x] + '</a>' + '<p>' + data[2][x] + '</li>'; $results.append(html).scroll(function(){ $(this).fadeIn(); }); console.log(html) } // End loop }, // End success function }); // End ajax call } // End search function
}); // End of Code
Developer | Luis Ulua |
Username | UluaWebDev |
Uploaded | January 09, 2023 |
Rating | 3 |
Size | 3,406 Kb |
Views | 10,120 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Palindrome Checker | 3,913 Kb |
HExA Clock | 2,187 Kb |
Practice | 2,999 Kb |
It Breathes | 2,739 Kb |
Free Code Camp - Local Weather App | 3,746 Kb |
Responsive text | 2,626 Kb |
A Pen by Luis Ulua | 3,063 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Mario | Takaneichinose | 3,902 Kb |
RollOver Effect 2 | Lmack90 | 2,162 Kb |
Slides-07-1 POSITION | Exhtml | 1,909 Kb |
Firefox Breakout Guide | Quincysoeliman | 2,576 Kb |
Bootstrap example | Ssaakkaa | 2,716 Kb |
Polo, the flying squirrel | Agbales | 2,445 Kb |
STIKHOI | Denmch | 7,122 Kb |
Toolbar | Onsen | 5,414 Kb |
Simple animated hover effect | Pobee-norris | 3,044 Kb |
Jochaho Skeleton | Dhanushbadge | 1,689 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!