Forums

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

Home Forums JavaScript Jquery function to vertical align the elements doesn't work Reply To: Jquery function to vertical align the elements doesn't work

#245577
Kevin Mamaqi
Participant

I think that the problem is with the scroll function. The first time that the user scrolls it takes padding-top 0, but when it keeps scrolling it takes .outerheight() with the given padding and recalculates again the value.

So I will need to use this function when the user is on top of the screen or when he is not on the top (cause the menu only has two different heights).