Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Images? #22

Open
iamlee opened this issue Nov 4, 2014 · 2 comments
Open

Multiple Images? #22

iamlee opened this issue Nov 4, 2014 · 2 comments

Comments

@iamlee
Copy link

iamlee commented Nov 4, 2014

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

@iamlee
Copy link
Author

iamlee commented Nov 7, 2014

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

});

@Artaud
Copy link

Artaud commented Sep 19, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants