Open iamlee opened 10 years ago
FYI i came up with a workaround using random numbers, this is the code i cam up with which seems to work fine, i just needed to rename my images to a generic name and appended a number to the end.
$('.snowfall-flakes').each(function(i, el){ var src = $(this).attr("src").split("."); var randomNumber = Math.floor(Math.random() * 5) + 1; var newSrc = src[0] + randomNumber + '.' + src[1];
$(this).attr("src", newSrc);
});
I am just initiating the snowfall multiple times with different image property and it works alright...
Is there an easy way to add multiple images to the snow fall effect with an array within the image object?