├── index.html ├── readme.md └── responsive-enhance.js /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 24 |Depending on the size of your viewport, you may see a 400px by 300px wide image, or a 800px by 600px image. Try refreshing the page with a small or wide browser window. The standard image is always downloaded, full images are then downloaded as needed.
31 |<img id="demo1" src="http://dummyimage.com/400x300" alt="Responsive Image" data-fullsrc="http://dummyimage.com/800x600">
33 | <script>responsiveEnhance(document.getElementById('demo1'), 400);</script>
34 | Here's a photo of some lovely star biscuits that @qwertykate bought us. Image courtesy of adactio.
35 | 36 |<img id="demo2" src="http://farm8.staticflickr.com/7022/6806617685_3be0d007c3_m.jpg" alt="Responsive Image" data-fullsrc="http://farm8.staticflickr.com/7022/6806617685_b793771008_o.jpg">
37 | <script>responsiveEnhance(document.getElementById('demo2'), 240);</script>
38 |