Conditioner.js allows us to conditionally load modules based on their surroundings automatically. With Conditioner.js you can simply add a few custom attributes to your markup one containing a traditional length value which will determine if the module, including scripts, will be loaded. If the width of the container is not greater than then length value then the request will be spared.
More Info & Download
You can get more info and download the library here