Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript [Solved] bottom-to-top JQuery animation not working in chrome

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #187338
    stuttgart
    Participant

    I’m having trouble with animating a div going from bottom to top. It works fine in Firefox but acts weird in Chrome. My guess is that is has to do with “top” getting animated and not “bottom” but I have no idea to get around this. Could someone please help me?

    CodePen: http://codepen.io/JohnnyStuttgart/pen/swjtb

    #187342
    Paulie_D
    Member

    Instead of bottom:0 why not top:100% ?

    http://codepen.io/Paulie-D/pen/FcCwE

    #187344
    Paulie_D
    Member

    Even better…do it with a toggleClass and a transition.

    http://codepen.io/Paulie-D/pen/fsFaj

    #187350
    stuttgart
    Participant

    Yes I’ve also thought of that solution but as you can tell #two-div flows outside, under the #left-div. Is there a work around for that?

    #187358
    Paulie_D
    Member

    Ahhh…a little margin-top magic

    http://codepen.io/Paulie-D/pen/ydahC

    #187364
    stuttgart
    Participant

    That seems to work! Thank you veeeeery much!

    #187393
    stuttgart
    Participant

    This was very helpful. I didn’t need the toggleClass(); but I’d just set the #two to top:100%; with a margin-top -100px; and it worked fine with my initial animation solution.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.