Created
April 17, 2012 13:19
-
-
Save janogarcia/2405930 to your computer and use it in GitHub Desktop.
Riloadr - Minimal example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js" lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="HandheldFriendly" content="True"> | |
<meta name="MobileOptimized" content="0"> | |
<meta name="viewport" content="width=device-width"> | |
<script type="text/javascript" src="riloadr.min.js"></script> | |
<script type="text/javascript"> | |
var group1 = new Riloadr({ | |
breakpoints: [ | |
{name: '320px', maxWidth: 320}, // iPhone 3 | |
{name: '640px', maxWidth: 320, minDevicePixelRatio: 2}, // iPhone 4 Retina display | |
{name: '640px', minWidth: 321, maxWidth: 640}, | |
{name: '1024px', minWidth: 641} | |
] | |
}); | |
</script> | |
</head> | |
<body> | |
<header> | |
<img class="responsive" data-src="images/cocoa_{breakpoint-name}.jpg"> | |
<noscript> | |
<img src="images/cocoa_320px.jpg"> | |
</noscript> | |
</header> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment