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

  • Home
  • SEARCH
  • 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 9016435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:59:42+00:00 2026-06-16T03:59:42+00:00

I am having one jquery overlay like this. When pageloads this will display like

  • 0

I am having one jquery overlay like this. When pageloads this will display like this.
ONLOAD

When user clicks close or feedback button again it goes back to its position like this.
POSITION

The functionality goes like this. Now When the user scrolls the page it should automatically goes back to its position. Onload i am writing this jquery code to perform this operation, onclick of close button reset() is called. onclick of feedback slideme() is called. So my question is when users scrolls down the page this overlay should go back to position. How to detect user scroll and perform this operation?

$(document).ready(function()
{
    SlideMe();

    $('body').keypress(function(e)
    {
        if(e.keyCode == 27)
        {
            reset();
        }
 });

    });
    function SlideMe()
    {   
        if(document.getElementById('hdnFBStats').value == 1)
        {
            document.getElementById('hdnFBStats').value =0;
            reset();
            return false;
        }

        $lngDocWidth = ($(document).width()/3)+32;

        $('#overlay').fadeIn('fast',function(){
            $("#fb").animate({marginRight:$lngDocWidth}, 1500);         
        });

        $("#feedbackimg").css("margin-right", '100px');
        $("#feedbackimg").css("float", 'right');

        document.getElementById('hdnFBStats').value= 1;
    }

    function reset()
    {
        $("#fb").css('margin-right', '0px');
        $('#overlay').fadeOut('fast');
    }
  • 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-06-16T03:59:44+00:00Added an answer on June 16, 2026 at 3:59 am

    This will only do the scroll check if the tab is actually open.

    $(window).scroll(function() {
        if(document.getElementById('hdnFBStats').value == 1) {
            document.getElementById('hdnFBStats').value = 0;
            reset();
        } else {
            if($(window).scrollTop() == 0) {
                SlideMe();
                document.getElementById('hdnFBStats').value = 1;
            }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having difficulties to understand the code below taken from this page http://trevordavis.net/play/jquery-one-page-nav/ (tutorial
Having an issue with traversing in jQuery.. hopfully an easy one..but I'm banging my
I am having one heck of a hard time trying to figure this out.
I think I'm not the only one having this problem. Whenever I try to
I'm having one heck of a time getting this validation to work. I'm using
So I've written this code for a sliding menu, only I'm having one problem,
Hi I'm having an issue with using jquery overlays failing to close when my
Here I'm using jquery validate plugin. In my form are having one drop down
I have created one jquery mobile site which having the tab control and it
I am new to jQuery! I am having one table which load data from

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.