facebook

Scrolling in html widget and remote page results

💡
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 1 post (of 1 total)
  • Author
    Posts
  • #335354 Reply

    Yann
    Member

    Hello
    If I take the example of a search engine, the result is displayed in a html widget.
    How can I do to set the height of the scrolling because I do not know in advance the number of results?
    I try to insert this code without success

    <div id='contenu'>
        <div class="mydiv">
    </div>
    </div>
    $(document).ready(function(){ 
        
            var offset = $('#contenu').offset();
            var charge = "non"
    
            $(window).scroll(function(){ 
                if((offset.top-$(window).height() <= $(window).scrollTop()) && charge=="non"){ 
                
                    charge = "oui"; // loading in progress
                
                        $.ajax({
                            type : "POST",
                            url : "suite.php", // remote web page
                
                            error :function(msg){
                                alert( "Erreur : " + msg );
                                },
                            success : function(data){
                                $('#contenu').append(data); // add
                                offset = $("#contenu").offset(); 
                                charge = "non"; 
                        }});
                }
    
            });
    
        });

    I’m stuck with this problem if support can help me it would be cool thank you
    Yann

Viewing 1 post (of 1 total)
Reply To: Scrolling in html widget and remote page results

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