HiSRC – speedtest only
Modified version that only contains the speedtest & pixelratio-test. Also added success and error callback functions. Usage (outside of document ready):
jQuery.hisrc.speedTest({
speedTestUri: '/path/to/50K.jpg',
success: function(){
console.log('success');
console.log(jQuery.hisrc.bandwidth);
console.log(jQuery.hisrc.devicePixelRatio);
},
error: function(){
console.log('error');
}
});