JQuery-Snowfall icon indicating copy to clipboard operation
JQuery-Snowfall copied to clipboard

Multiple Images?

Open iamlee opened this issue 11 years ago • 2 comments

Is there an easy way to add multiple images to the snow fall effect with an array within the image object?

iamlee avatar Nov 04 '14 11:11 iamlee

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);

});

iamlee avatar Nov 07 '14 14:11 iamlee

I am just initiating the snowfall multiple times with different image property and it works alright...

Artaud avatar Sep 19 '17 15:09 Artaud