Skip to content

Instantly share code, notes, and snippets.

Avatar

Sindre Wimberger sindre

View GitHub Profile
View mobile-meta-links.html
@sindre
sindre / gist:962201
Created May 9, 2011
JS createDocumentFragment to avoid reflow
View gist:962201
// http://www.slideshare.net/nzakas/high-performance-javascript-amazon-devcon-2011
var list = document.getElementsByClassName('items')[0],
fragment = document.createDocumentFragment(),
i, item;
for (i=0; i < 10; i++) {
item = document.createElement('li');
item.innerHTML = 'item #'+i;
fragment.appenChild(item);
}
View showcase.js
/**
Copyright (c) 2008 Victor Stanciu; contact [at] victorstanciu [dot] ro; http://www.victorstanciu.ro/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
View anzeige.html
<!-- Zweiter Versuch by @yatil --->
<!-- Nun auch mit Sprachauszeichnung. --->
<!-- Dritter Versuch by @sindrewimberger--->
<!-- Nun auch mit microformat. --->
<article class="vcard">
<hgroup>
<h2>Weitersagen!</h2>
<h1 class="note">Die führende <span lang="en">Social Media</span> Agentur Europas sucht:</h1>
</hgroup>
<ul>
@sindre
sindre / gist:593379
Created Sep 23, 2010 — forked from kaelig/gist:458477
HTML Newsletter - Make Outlook 2007+ behave with line-heights
View gist:593379
// Make Outlook 2007+ behave with line-heights
element {
mso-line-height-rule:exactly;
-mso-line-height-rule:exactly;
}
@sindre
sindre / gist:558771
Created Aug 31, 2010 — forked from remy/gist:330318
autofocus and placeholder support
View gist:558771
/**
* Add this script to the end of your document that use <input autofocus type="text" />
* or <input type="text" placeholder="username" /> and it'll plug support for browser
* without these attributes
* Minified version at the bottom
*/
(function () {
function each(list, fn) {
var l = list.length;
@sindre
sindre / gist:327765
Created Mar 10, 2010 — forked from jgornick/gist:50602
JS ImagesObserver
View gist:327765
/*
Title: ImagesObserver
About: Author
Joe Gornick
*/
/*
Class: ImagesObserver
@sindre
sindre / pGA.js
Created Dec 1, 2009
Monitor events with Google Analytics ga.js tracking code
View pGA.js
/* pGA - Monitor events with Google Analytics ga.js tracking code
* port of jGoogleAnalytics (version 1.0 2008-06-18) to use prototype
*
* @author: Sindre Wimberger // wimberger@echonet.at
* @version: 1.0 2009-05-20
*
* Requires Prototype 1.6.1 or higher
*
* Uses some elements of gaTracker (c)2007 Jason Huck/Core Five Creative
* http://plugins.jquery.com/files/jquery.gatracker.js_0.txt
You can’t perform that action at this time.