0

I am using jquery mobile for my mobile app. I want to make a page where data-role=content should be scroll when it is overflow but it is scrolling whole page with header and footer. I want to scroll only content div and header and footer divs should be fixed. I have already seen iscrollview but its only working in iPhone or any other way.

Please suggest how can I make this design.

2 Answers 2

1

Just add a data-position="fixed" to your header and footer. Check this example below:

<div data-role="page"> 
    <div data-role="header" data-position="fixed" data-tap-toggle="false">...</div> 
    <div data-role="content">...</div> 
    <div data-role="footer" data-position="fixed" data-tap-toggle="false">...</div> 
</div> 
Sign up to request clarification or add additional context in comments.

6 Comments

I have used this structure but content div is not scrolling
Hi, Please look at my updated structure. Also do you have enough content for the page to scroll? Do you have a link ?
i dont have link but check this link cubiq.org/iscroll-4; the plugin is available on this link. I want to create the same wich is available in this plugin but i dont want to use this plugin becoz its not working in all plat forms.
Check this page and scroll jquerymobile.com/demos/1.2.0/docs/toolbars/bars-fixed.html You'll notice that the header and footer will not scroll. That's what you want right?
yes, but can we change the style of scroll bar so that it seems to apper in content div and make header and footer so that they are not hide after clicking on the page
|
0

Take a look at http://cubiq.org/iscroll-4; it may not be jQuery, but it is a great JavaScript plugin for Mobile Scrolling.

You would add an ID to each UL and attach a scroll to each one separately.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.