Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3673650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:45:33+00:00 2026-05-19T02:45:33+00:00

I cant seem to get iScroll to work on the iPad and spent a

  • 0

I cant seem to get iScroll to work on the iPad and spent a few days trying to figure it out with no luck, so hopefully someone can help me out. Below is the code:

I first include the js files:

<script type="text/javascript" src="/js/iscroll.js?v3.7.1"></script>
<script type="text/javascript" src="/js/ipad_scroller.js"></script>

iscroll.js is the iscroll source. The second is a custom js I created based off the example they give on iscroll site which contains the following code:

 var deviceAgent = navigator.userAgent.toLowerCase();
 var agentID = deviceAgent.match(/(ipad)/);

 if(agentID) {

  var myScroll;
  var a = 0;
  function loaded() {
   setHeight(); // Set the wrapper height. Not strictly needed, see setHeight() function below.

   // Please note that the following is the only line needed by iScroll to work. Everything else here is to make this demo fancier.
   myScroll = new iScroll('ipad_scroller', {vScrollbar:true});
  }

  // Change wrapper height based on device orientation. Not strictly needed by iScroll, you may also use pure CSS techniques.
  function setHeight() {
   var headerH = document.getElementById('ipad_header').offsetHeight,
    footerH = document.getElementById('ipad_footer').offsetHeight,
    wrapperH = window.innerHeight - headerH - footerH;
   document.getElementById('ipad_wrapper').style.height = wrapperH + 'px';
  }

  // Check screen size on orientation change
  window.addEventListener('onorientationchange' in window ? 'orientationchange' : 'resize', setHeight, false);

  // Prevent the whole screen to scroll when dragging elements outside of the scroller (ie:header/footer).
  // If you want to use iScroll in a portion of the screen and still be able to use the native scrolling, do *not* preventDefault on touchmove.
  document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

  // Load iScroll when DOM content is ready.
  document.addEventListener('DOMContentLoaded', loaded, false);

 }

Here is the css for the divs being used in the code:

#ipad_header {
 width:100%;
 height:250px;
}

#ipad_footer {
 width:100%;
 height:48px;
 padding:0;
 border-top:1px solid #444;
}

#ipad_wrapper {
height:100px;
        position: relative;
        overflow: auto; 
}

#ipad_scroller {
position: relative;
        width: 100%;
        z-index: 1;
        overflow: hidden;
        height: auto;
}

Then in the html page I have

<div id="ipad_header">//content at the very top that I want to stay on top as it scrolls</div>

<div id="ipad_wrapper">
  <div id="ipad_scroller">
  //The rest of my page content
  </div>
</div>

<div id="ipad_footer">Footer content here</div>

Now I had this working at one time, but for some reason it stopped working on the ipad. The weird thing is if I turn the ipad to its side in landscaping mode it hangs for a few seconds then the iscroll stuff works just fine. Then if I move the ipad back into portrait mode it hangs again but the scroll starts to work again as well in portrait mode. Can anyone please help me out on this? I am pulling my hair out trying to find out what went wrong. I do know I recently upgraded ipad to the latest OS version but I believe this issue was happening before I did that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:45:34+00:00Added an answer on May 19, 2026 at 2:45 am

    Well after messing around with it the only way it seemed to work is if I made the height of the ipad_scroller div 1800px and the height of the ipad_wrapper to 200px

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I cant seem to get CI2's captcha helper to work... Can someone point out
Revising for php and cant seem to get this to print the values out
Hope someone can help i cant seem to get my head around this, i
I cant seem to find out how to get my ListView (OnListItemClick), to open
I cant seem to get this to work, It returns Null SELECT sdt, timeFor,
Hey, i cant seem to get this to work, im a little confused on
so I'm using C, I cant seem to get this to work right. It's
I cant seem to get my session to time out. see below very simple
I cant seem to get this to work. http://www.keironlowe.host56.com What I need is the
I'm trying to make an infinite round rectangle, but I cant seem to get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.