dinbror/blazy — pull request #29 by Milmoor (2014-08-10 19:17:04+00:00)
Title: Load background images last

Since there is a maximum to the amount of HTTP-requests which can be active at the same time, I suggest to differ between background and foreground images. The background images will be handled last. This change doesn’t work in IE7 and IE8, since “unshift” is used which isn’t supported in those browsers according to http://www.w3schools.com/jsref/jsref_unshift.asp. The original V1.2.2 has the same limitation. The new code is also depending on “classList” support which breaks IE9. This can be handled by adding https://github.com/eligrey/classList.js, or incorporating the JavaScript shim by Mozilla from this page: https://developer.mozilla.org/en-US/docs/Web/API/Element.classList.
A background image is either an image which is defined as a background-image in the css, or an image with the new class “b-late” to support multi-layer designs.