Closed simonajones closed 9 years ago
I have the same problem and fixed it by restarting the snow: $(window).bind("resize", function(){ $(document).snowfall('clear'); $(document).snowfall({...}); });
Looked into this bug a bit tonight, I don't think the snowfall script is doing it since I listen to window resize events. Went crazy resizing the window tonight and couldn't reproduce.
Hi, I'm using the Jenkins wall display plugin which has a 'christmas' theme that displays snowflakes using JQuery-Snowfall. Everything works fine until the window is resized.
The size calculation sets the height to 0, which stops the snowflakes from being painted as expected. The log in the console says "0".
It looks like the binding to the $(window) does give the wrong value when the plugin is initialised with the $(document).snowfall({..})
$(window).bind("resize", function(){
elHeight = $(element)[0].clientHeight; elWidth = $(element)[0].offsetWidth; console.log(elHeight); });
Is this something you have seen before? Thanks for the plugin, Simon