Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
482 views
in Technique[技术] by (71.8m points)

Maximise div[data-role=content] in Jquery Mobile

Has anyone actually succeeded in doing this it seems like there are so many attempts on line but no one has a definite solution. I've tried plugins that a lot of people suggested but nothing is working.

I just want to have a Google Map go full dimensions (apart from header and footer) and then on another page I want a div to do the same

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

JQuery-Mobile content area 100% height between head and foot

In the meantime I would recommend to use iScroll [with CSS position:fixed; for header&footer in iOS5 only]

In iScroll you just wrap the content into a wrapper & scroller class, the rest is done by the script. Here's the homepage http://cubiq.org/iscroll-4 and here's some code:

<div id="content" data-role="content">
     <div id="wrapper">
         <div id="scroller">
           your content here.
         </div>
     </div>
</div>

For iScroll initialization use the documentation provided on cubiq's site.

zY


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...