Coder Social home page Coder Social logo

Comments (5)

Silarn avatar Silarn commented on July 18, 2024

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.

Zurya avatar Zurya commented on July 18, 2024

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 avatar Silarn commented on July 18, 2024

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.

loktar00 avatar loktar00 commented on July 18, 2024

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.

Zurya avatar Zurya commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.