Comments (5)
I may have fixed this in my multi-element support branch. I think this is caused by the offset calculations in the non jQuery version. In my branch, I modified the script to mimic the jQuery version more closely by inserting the flake images inside the target element rather than in the body using offsets to 'place' it over the target element.
This means that the flake positions only need to be positioned relative to the parent - so you don't need the top and bottom offsets - and removes some errors that can happen if those offsets are instantiated wrong.
from jquery-snowfall.
Is it possible for you to provide me the modified script?
I also tried the jQuery version. Snow seems to fall up to bottom of the screen but again not to the bottom of the page! With non jQuery version, snow falls up to 75% of the screen.
from jquery-snowfall.
Silarn/JQuery-Snowfall@51adb77
It should use the height of the target element to determine collision - so make sure your body is stretched all the way down the page. Might need a clearfix.
from jquery-snowfall.
Hopefully this is addressed with the current version, and like @Silarn pointed out, make sure the elements boundaries actually extend to where you want the snow to fall.
from jquery-snowfall.
Thank you @loktar00 and @Silarn for your prompt replies and suggestions.
I happened to figure out that position of the JS code matters through trial and errors. Initially, I was placing the JS code right after opening body tag. Today, I tried placing it to just before the closing body tag, snow started falling to the bottom!! :)
Thank you once again for your wonderful plugin! 👍
Cheers!!
from jquery-snowfall.
Related Issues (20)
- Snow Globe Effect HOT 1
- Cannot read property 'x' of undefined HOT 1
- Feature request: rotation of images as they fall HOT 2
- cdnjs HOT 3
- Bower config - 'main' property
- Position error HOT 2
- Stop after n seconds? HOT 3
- Does it work with jquery version 1? HOT 2
- Jquery, Bootstrap, custom jscripts = not working?
- Change Positioning from top/left to transform HOT 2
- Collect doesn't seem to be working HOT 3
- Possible to have the snowflakes go UP (backwards) or a certain direction?
- Missing jQuery in Example Index HOT 2
- AJAX content
- Scrollbar flashing referred to in Issue #21 appears to still exist.
- Option to exclude mobile devices HOT 3
- Really high CPU load with just a few flakes
- Only show image base snowflakes after the image has fully loaded HOT 1
- Without jQuery Version HOT 2
- Can I use snowfall.js for commercial purposes?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-snowfall.