I have the following code:
var products = [];
$('.mCSB_container').children('li').each(function () {
products.push($(this).data("full-image"));
});
$.fn.preload = function() {
this.each(function(){
$('<img/>')[0].src = this;
});
}
$(products).preload();
what does this preload function does? Does it iterate through the array of products and then set the src to this? But what is this in this case.. What's an equivalent of this function without using the $.fn