facebook

Automatic scrollExtend

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #334397 Reply

    Yann
    Member

    Hello,
    i try without succes to make an automatic loading content with jquery scrollExtend
    like this example :http://www.contextllc.com/dev_tools/jQuery/scrollExtend/latest/jquery.scrollExtend.example.html
    The script works well in a html page but not in html oblject
    an idea?

    Thanks
    Yann

    Attachments:
    You must be logged in to view attached files.
    #334409

    support-michael
    Keymaster

    >The script works well in a html page but not in html oblject

    1) By HTML page do you mean the library works in a non-mobione webpage?

    2) Does “html oblject” mean an Designer HTML widget?

    If you are embedding an html widget in a scrolling panel this could be an issue. That is because the panel uses the iScroll library which could have some negative interaction. I do know that iscroll includes an api or event callback for pull/push refresh when hit the top or bottom of a scroller. I would have to look up the api for that.

    3) The following code is wrong as I don’t thnke the jquery.ready() callback will ever be called. Note that you should not register jquery.ready callback. The phoneui.documentReadyHandler() does the equivalent.

    /**
     * Called when document is loaded.
     */
    phoneui.documentReadyHandler = function() {
      
        jQuery(document).ready(  // <--- this is goofed
        function() {
          jQuery('.scroll_container').scrollExtend(
            {  
              'target': 'div#scroll_items',      
              'url': 'more_content.html', 
              'newElementClass': 'list_item more_content'
    
            }
          );
     

    Try this and see if you have better results:

    phoneui.documentReadyHandler = function() {
      
          jQuery('.scroll_container').scrollExtend(
            {  
              'target': 'div#scroll_items',      
              'url': 'more_content.html', 
              'newElementClass': 'list_item more_content'
            }
        );
    
    #334411

    Yann
    Member

    Hello Wayne
    thanks for your response

    >By HTML page do you mean the library works in a non-mobione webpage? Yes
    >Does “html oblject” mean an Designer HTML widget? Yes sorry an Designer HTML Widget

    unfortunately i’ve the same result with your modification

    how to handle the scroll in Designer HTML Widget without scrolling panel ? (my final project will call a remote page by ajax and display his content in Designer HTML Widget)
    Thanks a lot
    Yann

    #334415

    support-michael
    Keymaster

    >how to handle the scroll in Designer HTML Widget without scrolling panel ?

    Presently, for a scrolling html widget the primary solution I have worked with involves embedding the html widget in a scrolling panel (uses iScroll). For cross-platform support with fixed layouts I don’t know that you can accomplish scrolling any other way. I have not worked with this yet but I know our team continually evaluates the usability of technical advances like the iOS5 & 6 specific features such as webkit-overflow-scrolling. Seems this native scrolling approach is not a silver bullet yet (hoping to see it working fully soon).

    I have requested assistance from our devteam to see what examples we have that might be helpful.

    #334432

    support-michael
    Keymaster

    I’m not sure if this will be helpful but here is an example that illustrates how to register a scrollEnd callback on a scrollable panel:

    http://www.genuitec.com/support-genuitec/viewtopic.php?p=13705#p13705

    #334453

    Yann
    Member

    Hello Wayne
    thanks a lot for your help
    the ideal for me would be to detect the bottom of panel to launch a javascript function that calls a remote page and add content to my html widget whenever the end of scrolling is detected. (just like the following model: http://www.contextllc.com/dev_tools/jQuery/scrollExtend/latest/jquery.scrollExtend.example.html
    Your solution is interesting, but I do not see how to apply the function starts as soon as you stop scrolling even if it is not to the bottom of panel.
    i hope with by bad english you understood what i want to say
    Thanks
    Yann

    #334454

    support-michael
    Keymaster

    > I do not see how to apply the function starts as soon as you stop scrolling even if it is not to the bottom of panel.

    Yikes! Will investigate and provide an update asap. It should have only fired when the scroller reaches the top or bottom of its range.

    #334455

    Yann
    Member

    Great
    thanks a lot

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Automatic scrollExtend

You must be logged in to post in the forum log in