I looked at other posts on stackoverflow, but they seem too complicated for such an easy task.
All I want to do is have a fixed title on top of my mobile application, which will ALWAYS stay there even when I look through the βlistβ. Tell the easiest way to achieve this. Right now, when I scroll down, the title appears, but after clicking it leaves. How can I crack this jquery behavior? Thanks!
I have it:
<!DOCTYPE html> <html> <head> <title>Testing Jquery</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /> <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script> </head> <body> <div data-role="page"> <div data-role="header" data-position="fixed"> <h1>Page Title</h1> </div> <div data-role="content"> <ul data-role="listview" data-theme="g"> <li><a href="#">Item1</a></li> <li><a href="#">Item2</a></li> <li><a href="#">Item3</a></li> </ul> </div> </div> </body> </html>
source share