Skip to content

Instantly share code, notes, and snippets.

@alirokni
alirokni / script.js
Last active October 21, 2016 19:09
Search wikipedia with underscorejs temlplate
$(function() {
function doSearch() {
var searchInput = $('.search').val();
if (searchInput.length < 1 || $("ul#tabsContent li").hasClass( "list-items" ) === true) {
return false;
}
var wikiUrl = "https://en.wikipedia.org/w/api.php";
$.ajax({
url: wikiUrl,
data: {
@alirokni
alirokni / Wikipedia-Viewer.html
Last active October 21, 2016 17:32 — forked from anonymous/index.html
Wikipedia Viewer
<div class="main-container">
<a class="wiki-link" href="https://en.wikipedia.org/wiki/Special:Random" target="_blank">Wikipedia Random article <i class="fa fa-external-link" aria-hidden="true"></i></a>
<div class="input-group search-group">
<input type="text" class="form-control search" placeholder="Search for...">
<span class="input-group-btn search-go">
<button class="btn btn-secondary" type="button">Search Wikipedia!</button>
</span>
</div>
<ul class="list-continer">
@alirokni
alirokni / script.js
Last active October 14, 2016 21:30 — forked from anonymous/index.html
Weather-GeoLocation
"use strict";
var myGeoLocationApp = myGeoLocationApp || (function() {
// on dom ready main functions
$(function() {
$('#js-geo-btn').on('click', myGeoLocationApp.findMyLocationWeather);
$('#js-geo-search, #js-location-search').on('click', myGeoLocationApp.searchLocationEnter);
var setMessageTimerMain = new myGeoLocationApp.SetMessageTimer('.information .js-geolocation-note', 'bg-warning', 3000);
setMessageTimerMain.showMessage();
});
@alirokni
alirokni / 2016-10-13-Random-Quote-Machine.html
Last active October 22, 2016 00:21 — forked from anonymous/index.html
Random Quote Machine
<div class="container">
<header class="header">
<h4 class="fa header text-primary">Random Quote Machine</h4>
</header>
<main class="main center-block">
<div class="content" id="quote">
<i class="fa fa-quote-left">