Skip to content

Instantly share code, notes, and snippets.

PhilippSoehnlein / demo.js
Created Aug 20, 2017
Lazy loading images with Intersection Observer
View demo.js
* A simple demo on how the new Intersection Observer API can be used to lazy load images.
* Intersection Observer is available in most modern browsers and there's a decent polyfill, too:
let imageNodes = [];
PhilippSoehnlein / modernizr-test_position_fixed_ios.js
Created Nov 3, 2011
Modernizr Test for position fixed (including iOS tests)
View modernizr-test_position_fixed_ios.js
/* modernizr-test_position_fixed_ios.js
* Original by Daniel Ott (
* 3 March 2011
* Updated by Philipp Söhnlein 3 November 2011
* Custom Tests using Modernizr's addTest API
/* iOS
* There may be times when we need a quick way to reference whether iOS is in play or not.
* While a primative means, will be helpful for that.