- Overview
- Documents
Data image delivery is a small plugin to deal with responsive image delivery depending on screen width.
Source: dev.twoblok.es
Jul 10, 2014 in Layout 3205 views
Data image delivery is a small plugin to deal with responsive image delivery depending on screen width.
Source: dev.twoblok.es
1. INCLUDE JS FILES
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> <script src="data-img.min.js"></script>
2. HTML
<img class="data-img" src="http://placehold.it/1x1" data-sml="img/400x320.jpg" data-med="img/800x640.jpg" data-lrg="img/1000x800.jpg" >
3. JAVASCRIPT
$('.data-img').dataImg();
4. OPTIONS
$('.data-img').dataImg({ sml: 200, med: 400, lrg: 800, resize: true });
Tagged with:
data image delivery
jquery plugin
responsive image
window resize
browser resize
screen width
image delivery
responsive
Related Articles