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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:54:35+00:00 2026-05-28T06:54:35+00:00

I have been trying to use follow scroll to move dialog together with user

  • 0

I have been trying to use follow scroll to move dialog together with user scroll but no success

<script>
$(function() {
    $( "#dialog:ui-dialog" ).dialog( "destroy" );
    $( "#dialog-report-problem-form" ).dialog({
        autoOpen: true,
        height: 550,
        width: 700,
        modal: true,
        buttons: {
            "<?= $this->translate('REPORT_PROBLEM'); ?>": function() {
                reportProblem();
            },
            "<?= $this->translate('CANCEL'); ?>": function() {
                $( this ).dialog( "close" );
            }
        },
        close: function() {
        }
    });
    $.scrollFollow("#dialog-report-problem-form",{speed: 10}); 
});
</script>

.

<div id="dialog-report-problem-form" title="<?= $this->translate('REPORT_PROBLEM'); ?>">
    <?= $this->form ?>
</div>

I have been receiving the error

 box.cont.offset() is null

Does anyone knows how could fix or another jquery based solution to follow user scroll?

  • 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-28T06:54:35+00:00Added an answer on May 28, 2026 at 6:54 am

    The plugin scrollFollow seems to be pretty buggy and development discontinued (last update in 2008)

    • when you use it with $.scrollFollow(), the default option values are not set so you get a lot of errors like the one you got.
    • when using it with $(...).scrollFollow, the main option container is not obtained correctly so it does not really work…

    Here is a small script that will move the dialog around when the window is scrolled:

    (function(wnd, $) {
    
            // query for elements once
        var $dlg = $("#dialog-report-problem-form").parent(),
            $wnd = $(wnd),
            // get the initial position of dialog
            initialTop = $dlg.offset().top - $wnd.scrollTop();
    
        $wnd.scroll(function() {
                // when qscrolling, animate the 'top' property
                $dlg.stop()
                    .animate({
                        "top": ($wnd.scrollTop() + initialTop) + "px"
                    }, "slow");
            })
            .resize(function() {
                // in case of resize, re-set the initial top position of the dialog
                initialTop =  $dlg.offset().top - $wnd.scrollTop();
            });
    
        // if you close/open the dialog, it will mess up the 'initialTop'
        // this will re-set the correct 'initialTop' when the dialog opens again
        $dlg.bind('dialogcreate dialogopen', function(e) {
            initialTop = $dlg.offset().top - $wnd.scrollTop();
        });
    
    })(window, jQuery);
    

    Working example on jsfiddle.

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

Sidebar

Related Questions

I have been trying to use date_format , however as far as I know,
I have been trying to use array_unique to remove duplicates from the search results
I have been trying to use routes.rb for creating a URL /similar-to-:product (where product
I have been trying to use the hibernate dialect for SQLite from http://code.google.com/p/hibernate-sqlite/ in
I have been trying to use/save the boolean value of a checkbox in other
I have been trying to use 3rd party tool called visiblox for rendering charts
I have been trying to use the document.getElementByID to pull information from an HTML
Right now I have been trying to use Launchpad's API to write a small
Ok I'm stumped. I have been trying to use Simpletip to create a tooltip
I have been trying to figure out why and how to use performSelector. I

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.