Search code examples
javascriptjqueryioscssonscroll

How has Facebook built this fixed-on-scroll box with iOS support?


How has Facebook built this fixed-on-scroll box (sticky sidebar) on their new prasentation site for the new newsfeed?

enter image description here

I know many of the solutions for doing this but this one is special. The switching between position: relative and position: fixed works at the touchmove event (not special) but it also works on the iOS scroll pan!

I thought that wasn't possible - see here. How did they do this?


Solution

  • Apparantly it uses the webkit function position: -webkit-sticky;

    Explanation is found here.