drewbrolik/Responsive-Img — pull request #4 by reblutus (2013-06-04 19:06:31+00:00)
Title: Added background functionnality

Modified responsiveImg.js to support css background. Set your css background to a spacer (so it doesn't load)

#header {
background:#f0f8ff url("../images/spacer.gif") no-repeat 0% 80%;
[...]
}

and add attribute data-src to the html element with the large background's path.

Then call something like

$("[data-src]").responsiveImg({ srcAttribute:"data-src" });

Modified responsiveImg.js.php: minor optimization to avoid file system overhead.