How to create a fixed header on a mobile browser
I'm looking for a JavaScript/jQuery plugin which allows to use a fixed header on mobile browser.
iScroll seems to be the most 开发者_如何学运维popular solution but I was interested in a plugin that isn't constantly calculating the position of the header while scrolling.
The idea is the same used by jQueryMobile fixed toolbars, while the user is scrolling the header disappears and only reappears after finishing scrolling.
It's more simple than what you think. I use this code:
<div data-role="header" data-position="fixed">
<h1>Fixed Header!</h1>
</div>
See more info: http://jquerymobile.com/demos/1.2.0/docs/toolbars/bars-fixed.html
精彩评论