Skip to content

Instantly share code, notes, and snippets.

View matharchod's full-sized avatar

Jani Momolu Anderson matharchod

View GitHub Profile
@matharchod
matharchod / slideshow.html
Created January 13, 2012 00:08
slideshow
<html>
<head>
<title>Gallery Test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
slides = [
"images/plug2-offline-icon.jpg",
"images/notsign-offline-icon.jpg",
"images/globe-offline-icon.jpg",
@matharchod
matharchod / showDateIn.js
Created January 18, 2012 22:05
A jQuery date script that appends the current date & time to a DOM element
function showDateIn(elem) {
var date = new Date();
var today = date.toLocaleDateString();
var hours = date.getHours();
var minutes = date.getMinutes();
var ampm;
if (minutes < 10) {
minutes = "0" + minutes;
}
<!-- TWO STEPS TO INSTALL BASIC SLIDESHOW:
1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
@matharchod
matharchod / gist:6137053
Last active December 20, 2015 13:09
jQuery function to scroll to anchor point on page load (split by hash/pound sign)
//scroll to anchor point on page load
function scrollOnLoad() {
try {
//take HREF and split at anchor
var $_elem = $('#' + $(location).attr('href').split('#')[1]);
//find class of anchor element
var $_others = $('.' + $_elem.attr('class'));
//measure window height and element height
//if the window height is smaller that twice the element height, then use regular offset
@matharchod
matharchod / SassMeister-input.scss
Last active August 29, 2015 14:07
Generated by SassMeister.com.
// ----
// Sass (v3.4.6)
// Compass (v1.0.1)
// ----
#languageGate {
color: #fff;
text-align: center;
padding: 10%;
position: relative;
@matharchod
matharchod / SassMeister-input.scss
Created November 13, 2014 04:29
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
.nt-tabs {
margin: 5%;
border: 1px solid;
.nav-tabs>li {
width: 25%;