I am in the process of creating a mobile website (non-native) for an iPhone 4. I want to include a "header" that is 80 pixels high and 100% wide, but remains hidden until the user swipes down on the screen.
I found a helpful article that almost meets my needs:
However, the solution provided in the article is more complex than what I require and includes additional features that I don't need. When I attempted to integrate it into my existing webapp, it caused styling issues and didn't work correctly. The article uses styles that are unnecessary for my project. Rather than spending hours tweaking their styles and deciphering which ones are necessary for the pulldown effect, I am seeking a simpler approach to achieve this functionality.
My goal is to allow users to slide their finger downwards on the mobile webpage to reveal the hidden header. When they release their finger, the header should slide back up and become invisible again. I don't need any extra bells and whistles beyond that.
Additionally, I am curious about which "event" is triggered in a mobile browser when a user pulls the webpage downwards with their finger. Is it the "onscroll" event or something specific to mobile devices?
Thank you.