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 7528083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:16:48+00:00 2026-05-30T04:16:48+00:00

I have implemented a WebApp using SplitView – http://asyraf9.github.com/jquery-mobile/ – (and that seems to

  • 0

I have implemented a WebApp using SplitView – http://asyraf9.github.com/jquery-mobile/ – (and that seems to use the ScrollView component) together with jQuery Mobile. Everything works fine …

Within the panel I have got a list of elements that should dynamically add elements when scrolling reaches the end of the list. On the iPhone I do not use SplitView but iScroll – http://cubiq.org/iscroll – and the following code to achieve this (and it is working).

HTML:

<div data-role="panel" data-id="menu" data-hash="crumbs" style="z-index: 10000;" id="Panel">
    <div data-role="page" id="Root" class="Login" onscroll="console.log('onscroll');">
        <div data-role="content" data-theme="d" onscroll="console.log('onscroll');">
            <div class="sub">
                <ul data-role="listview" data-theme="d" data-dividertheme="a" class="picListview" id="PortfolioList">
                    <!-- Content added dynamically -->
                </ul>
            </div>
        </div>
    </div>
</div>

Javascript:

var defaultIScrollOptions = { 
    useTransition: true, 
    onScrollStart: function() { 
        this.refresh();
    }, 
    onScrollEnd: function() { 
        if (this.elem && this.id) { 
            possiblyDisplayNextDocuments(this.y, this.elem, this.id); 
         } 
    }
};
iScrolls.push(new iScroll(document.getElementById("searchResults").parentNode, defaultIScrollOptions));

But when using SplitView I do not really know which event and which element to bind the listener on or how to get the scroll position. I already tried several combinations, but did not achieve good results. The best one was the following:

$("#PortfolioList").scrollstop(function(event) {
    console.log("scrollstop: "+$("#PortfolioList").scrollTop());
});

My question is: Am I using the right event listener (since it already fires althgough the scrolling animation is still in use) and how do I get the scroll position?

  • 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-30T04:16:49+00:00Added an answer on May 30, 2026 at 4:16 am

    dont use the scrollview plugin. its buggy. Use iscroll for both iOS phonegap apps as well as android. It works fine on both.
    For detecting the scroll and loading new elements into the list, listen to the the ‘onScrollMove’ event of iscroll.
    In the iscroll-wrapper.js add this-

     options.onScrollMove = function(){
          that.triggerHandler('onScrollMove', [this]);
        };
    

    then in your code attach a event handler to the onScrollMove event and handle adding new rows in that.
    onScrollMove will fire whenever you scroll.
    In the handler you can find how many rows are there in your list and that which row is on the top of your view port using something like

     iscrollScrollEventHandler:function(event){
        var contentDiv= $('div:jqmData(id="main") .ui-page-active div[data-role*="content"] ul li' );
        var totalItemsonList =   contentDiv.length;
    
        var cont =$('div:jqmData(id="main") .ui-page-active div:jqmData(role="content")');
    
        var itemToScrollOn =  totalItemsonList - x; // x is the item no. from the top u want to scroll on. u need to keep updating i guess
        var docViewBottom = $(cont).scrollTop() + $(cont).height();
        var itemOffset = $(contentDiv[itemToScrollOn]).offset();
        if(itemOffset){
            var elemTop = itemOffset.top;
            if (elemTop <= docViewBottom){
                event.data.callback();
            }
        }
    }
    

    and in the callback add the code to add new rows. hope that helps.

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

Sidebar

Related Questions

I have a webapp implemented using struts+spring+hibernate which needs to be hosted in glassfishV3
I have implemented a python webserver. Each http request spawns a new thread. I
I have implemented tracing based on System.Diagnostics. I am also using a System.Diagnostics.TextWriterTraceListener, and
We have implemented a popup window as a modal dialog using the IE method:
I have implemented a web app using session state management as per the instructions
I have a webapp development problem that I've developed one solution for, but am
In my JSF 1.2 webapp I have a page with a <h:commandButton> that invokes
I have successfully implemented rest webservice using apache wink. I am using ant to
I have implemented SSO for tomcat using the valve in the config.xml however all
I am using Spring MVC to develop a Java webapp. I have a setup

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.