Skip to content

Instantly share code, notes, and snippets.

View netsi1964's full-sized avatar

Sten Hougaard netsi1964

View GitHub Profile
@netsi1964
netsi1964 / javascript dynamicweb various.js
Created October 10, 2012 13:39
javascript dynamicweb various
(function($, window, undefined){
// https://gist.github.com/3865708
function insertExtraYears(selectorYear, iYearFrom, iYearTo) {
var year = jQuery(selectorYear);
var html = year.html();
var ahtml = html.split('><');
var aextra = [ahtml[0]];
for(var y=iYearFrom; y<iYearTo; y++) {
aextra[aextra.length] ='<option value="'+y+'">'+y+'</option'
}
<html>
<head>Testing incrementable</head>
<body>
<div class="container">
<div class="row">
<div class="span3" id="visual">
<div class="colorVisual"></div>
<div class="colorVisual"></div>
</div>
<div class="span7">
<div class="container">
<div class="row">
<div class="span3" id="visual">
<div class="colorVisual"></div>
<div class="colorVisual"></div>
</div>
<div class="span7">
<h3>Testing incrementable by <a href="twitter.com/leaVerou">@LeaVerou</a></h3>
<blockquote>
If you work with code where you need the user to be able to change a color value in a Firebug way, you will love the "<a href="http://raw.github.com/LeaVerou/incrementable">incrementable</a>" piece of code by <a href="twitter.com/leaVerou">@LeaVerou</a>.<br />
@netsi1964
netsi1964 / index.html
Created October 14, 2012 10:30
Using the code "incrementable" by LeaVerou I have setup a small webapp where you can adjust colors using arrow, and generate the CSS.
<div class="container">
<div class="row">
<div class="span3" id="visual">
<div class="colorVisual"></div>
<div class="colorVisual"></div>
</div>
<div class="span7">
<h3>Testing of incrementable v/0.95</h3>
<blockquote>
If you work with code where you need the user to be able to change a color value in a Firebug way, you will love the "<a href="http://raw.github.com/LeaVerou/incrementable">incrementable</a>" piece of code by <a href="twitter.com/leaVerou">@LeaVerou</a>.<br />
@netsi1964
netsi1964 / javascriptLocalstorageToDo.js
Created October 16, 2012 06:41
javascript localstorage toDo list
/****
Sten Hougaard, @netsi1964, Localstorage items
Ver 0.98, not fully tested
Please note: Do not support storing of objects with functions
Added option to parse key (when using more than one localstorage)
Changed names from toDos to items, more generic
****/
var items;
if (typeof localStorage === 'undefined' ) {
@netsi1964
netsi1964 / index.html
Created October 21, 2012 08:51
Sexy CSS3 round buttons
<nav>

<ul class="nav">

<li><a href="#" class="icon-home"></a></li>

<li><a href="#" class="icon-cog"></a></li>

<li><a href="#" class="icon-cw"></a></li>

<li><a href="#" class="icon-location"></a></li>

</ul>

</nav>
@netsi1964
netsi1964 / index.html
Created October 22, 2012 11:51
A CodePen by Sten Hougaard.
<div class="container-fluid">
<h1>Slide test</h1>
<div id="menu">
<strong>Menu</strong>
<ul>
<li><a href="">no 1</a></li>
<li><a href="">no 2</a></li>
<li><a href="">no 3</a></li>
<li><a href="">no 4</a></li>
<li><a href="">no 5</a></li>
@netsi1964
netsi1964 / index.html
Created October 22, 2012 11:59
A CodePen by Nicholas Smith. scss/compass animated button - inspired by Mary Lou http://tympanus.net/Tutorials/CircleHoverEffects/ this is just a version of the button i created with a few subtle differences using scss/compass
<div class="page-wrap">
<div class="contain-lynch contain-lynch-bkground">
<div class="info-lynch">
<h3>David Lynch</h3>
<div class="border"></div>
<p>A bad cup of coffee is better than no coffee at all</p>
<div class="button"><a href="#" class="click">BIO</a></div>
</div>
</div>
</div>
@netsi1964
netsi1964 / connectionStateOnBody.js
Created October 25, 2012 11:44
Using jQuery add online status class to body
function setConnectionStatus(cStatus) {
jQuery('body').removeClass('online offline').addClass((navigator.onLine) ? 'online' : 'offline');
}
window.addEventListener('online', setConnectionStatus, false);
window.addEventListener('offline', setConnectionStatus, false);
@netsi1964
netsi1964 / sublimeTextVariousSnippets.txt
Created October 25, 2012 12:07
Sublime Text 2 various snippets
HTML
<snippet>
<content><![CDATA[<a href="mailto:${1:[email protected]}">${1:[email protected]}</a>]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>mailto</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>text.html</scope>
</snippet>