javascript - Preloading images with jQuery

preview_player
Показать описание
#short
#javascript
#jquery
I'm looking for a quick and easy way to preload images with JavaScript. I'm using jQuery if that's important.
function complexLoad(config, fileNames) {
$("img").attr({
id: fileNames[x],
title: "The " + fileNames[x] + " nebula"
}
};

But, it looks a bit over-the-top for what I want!
I know there are jQuery plugins out there that do this but they all seem a bit big (in size); I just need a quick, easy and short way of preloading images!
Рекомендации по теме
welcome to shbcf.ru