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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:50:10+00:00 2026-06-07T04:50:10+00:00

I am working on a website http://dev.io-web.com/portfolio.aspx and am having difficulty with the slider

  • 0

I am working on a website http://dev.io-web.com/portfolio.aspx and am having difficulty with the slider that I programmed. For some reason when you click to change slides it resets the position of the scrolling on the site to the top. Is there a way to make it not change the position of the screen? I’ll include part of the code for the slider as well so it’s easier to understand what I’m doing:

$(".slide1").click(function() {
    if(current_slide != "slide1"){
            $(".arrow").animate({"margin-left":"349px"});
            if(current_slide == "slide2"){
                $(".slide2_display").stop(true,true).fadeOut().hide();
                $(".slide1_display").fadeIn().show();
                current_slide = "slide1";
                $("#slide2content").hide();
                $("#slide1content").show();
            }
            else if(current_slide == "slide3"){
                $(".slide3_display").stop(true,true).fadeOut().hide();
                $(".reps_display").fadeIn().show();
                current_slide = "slide1";
                $("#slide3content").hide();
                $("#slide1content").show();
            }
            else{
                $(".slide4_display").stop(true,true).fadeOut().hide();
                $(".slide1_display").fadeIn().show();
                current_slide = "slide1";
                $("#slide4content").hide();
                $("#slide1content").show();
            }

    }
});

I have this coded for each of the 4 different displays. It should only change the displays and not change the scrolling of the page, but maybe the click function automatically does something like that. Any help with a solution would be greatly appreciated. Feel free to take a look at the work in progress at the url listed above.

  • 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-07T04:50:11+00:00Added an answer on June 7, 2026 at 4:50 am

    This is happening because when you use jQuery.hide() to hide your div, its container .PortfolioSlider is being resized to 0px for a split second because it is empty. This shrinks the height of the page and causes the browser to jump to the top of the page.

    This is fixed simply by applying a fixed height of 660px to the css of .PortfolioSlider

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

Sidebar

Related Questions

Im having a problem. This is my website http://keironlowe.x10hosting.com/ The red lines that move
I'm working on this website http://www.eluminatecreative.com/new/index.html and where it says sum'r fling I need
Working on a website http://www.ArenaText.com written in asp.net with Microsoft AJAX control toolkit. iPad
I'm currently working on this website (http://www.jowannes.com/thomasschoof/flash/LauraBarsby.html) and I created a little gallery. When
I have website http://yournextleap.com/fresher-jobs Please find out last div having HTML <div data-recommendation= data-id=3790
I'm using this sticky footer in my website: http://www.cssstickyfooter.com/using-sticky-footer-code.html It is fully working in
On my website http://tehcoffee.com/ the gmaps4rails gem is not working. (except for the individual
I'm working on a website: http://www.allaboutwinecellars.com And on one of the galleries (the Accesory
I am working on the redesign of my website http://square1dev.com . In the sidebar
http://test.rfinvestments.co.za I've been working on this website for a little while and, now that

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.