Skip to content

Instantly share code, notes, and snippets.

View wintercounter's full-sized avatar
🧩
Solving the unsolvable puzzle of life.

Viktor Vincze wintercounter

🧩
Solving the unsolvable puzzle of life.
View GitHub Profile
<img src="large-default-file.jpg">
<source src="smaller.jpg" media="max-width:600px">
<source src="tiny.jpg" media="max-width:320px">
</img>
/* focusin/out event polyfill (firefox) */
!function(){
var w = window,
d = w.document;
if( w.onfocusin === undefined ){
d.addEventListener('focus' ,addPolyfill ,true);
d.addEventListener('blur' ,addPolyfill ,true);
d.addEventListener('focusin' ,removePolyfill ,true);
d.addEventListener('focusout' ,removePolyfill ,true);