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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:24:17+00:00 2026-06-05T10:24:17+00:00

Not sure what the method is or how its achieved. But I’m interested in

  • 0

Not sure what the method is or how its achieved. But I’m interested in knowing about it to possibly use it in an upcoming project. What I am referring to is when a block element is at a particular X/Y axis it seems it stops acting as though it were a fixed position element otherwise the element acts as a fixed position element.

I most commonly see this with navigation, where the header and footer are large and the element will stop acting as a fixed element when it reaches the bottom of the header or top of the footer

  • 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-05T10:24:19+00:00Added an answer on June 5, 2026 at 10:24 am

    You can do something like this,

    $(window).scroll(function(){    
        if ($(this).scrollTop() > 250){ 
            $('#top').css('position','fixed'); 
        }
        else{
            $('#top').css('position','static');
        }
    });
    

    A better approach would be,

    $(window).scroll(function(){    
        var top =  $('#top'); 
        if ($(this).scrollTop() > 250){
            if(top.css('position') !== 'fixed'){ 
                top.css('position','fixed'); 
            }
        }
        else{
            if(top.css('position') !== 'static'){
                top.css('position','static');
            }
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure how to use the Unproject method provided by GLM. Specifically, in
I'm not sure about clarity of the STAR word. I'm implementing a search method
Method keySet() . Examples works fine, but I not sure if I'm right.
I'd like to override UILabel 's setText method but I'm not sure that: A)
I'm not sure what it's called but you can override methods easily with: Apple
I am very very new to C/C++ and not sure what the method is
I am not really sure what this method does, or better I am not
I'm not sure how to pass the specific keystroke through the bind method.. $(document).bind('keyup',
This method that draws my tiles seems to be quite slow, Im not sure
How should I test a service method that is transactional for its simultaneous use

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.