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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:27:26+00:00 2026-06-18T08:27:26+00:00

Hello Iam building a top navigation system similar to this http://engageinteractive.co.uk/ (when scrolling under

  • 0

Hello Iam building a top navigation system similar to this http://engageinteractive.co.uk/
(when scrolling under the main picture the transparent navigation bar gets a solid transparent color).
in my design I gave to the navigation bar a fixed position and applied the following code

$(window).scroll(function() {
    var top_val = $(window).scrollTop();
    if(top_val > 600) {
        $("#main_nav_container").removeClass('transparent_0');
        $("#main_nav_container").addClass('transparent_1');
    }
});

This is working good for me and after passing the main site image (which is tested to be at value 600) the navigation container changes its display. the problem is that I also need to adjust this for a responsive design. my main top image changes its size according to the browser size, so I need in some way transform the fixed value that I got from the scrollTop() property to a relative size. I will appreciate if someone can help me with this

  • 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-18T08:27:27+00:00Added an answer on June 18, 2026 at 8:27 am

    You’ll need to read in the position of the main image, and then evaluate scrollTop() against that. Something like this, perhaps:

        var main_img = $('img.main_img'),
    scroll_change_at = main_img.offset().top + main_img.height();
    
    $(window).scroll(function() {
        var top_val = $(this).scrollTop();
    
        if(top_val > scroll_change_at) 
        {
            $("#main_nav_container").removeClass('transparent_0');
            $("#main_nav_container").addClass('transparent_1');
        }
    });
    

    Obviously replacing the relevant selectors for the main_img assignment.

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

Sidebar

Related Questions

Hello I am building a form in a mvc system view, and i want
Hello I know all about http://www.php.net/manual/en/function.http-build-query.php to do this however I have a little
Hello I am building a social network similar to facebook and I really need
Hello i am building a mobile webpage where my content only will be scrolling
Hello this is how I am building my own forum but this is how
Hello i am in desperate need of help on this i have an image
Hello I am building a website and text becomes unselectable in certain areas on
Hello guys I am building a chat server where I use a textfield on
Hello I downloaded Z3 from http://z3.codeplex.com/ and then opened the Z3 solution in Visual
hello i am building a template in c++ ,and i need to overwrite the

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.