loktar00 / JQuery-Snowfall

Makes it snow on any web page or specific element.
http://loktar00.github.io/JQuery-Snowfall/
712 stars 221 forks source link

The plugin doesn't work on safari #20

Closed yamenshahin closed 9 years ago

yamenshahin commented 10 years ago

I tested this plugin. It doesn't work on safari

No movement

yamenshahin commented 10 years ago

I used this http://stackoverflow.com/questions/17000394/requestanimationframe-not-available-in-safari-how-to-do-fluid-animations

And changed this code: snowTimeout = requestAnimationFrame(function(){snow()}); to this snowTimeout = window.requestAnimationFrame(function(){snow()});

Thanks for helpful plugin

loktar00 commented 10 years ago

ah wow.. I didn't realize Safari didn't have requestAnimationFrame, in the last update I pulled out the polyfill for it, suppose I'll add it back!

Lechus commented 10 years ago

Maybe use modernizr like function to detect if requestAnimationFrame is available?

loktar00 commented 10 years ago

eh I'd prefer not to add a large dependency like that Ill just readd the polyfill

loktar00 commented 9 years ago

https://github.com/loktar00/JQuery-Snowfall/issues/25 Moved to this issue