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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T05:04:42+00:00 2026-05-19T05:04:42+00:00

I have a content slider script that works fine for me in FF, IE

  • 0

I have a content slider script that works fine for me in FF, IE and Safari, but not in Chrome and Opera.

When I click on the link in the content navigation, the page jumps up to the next parent div. This just happens in Chrome and Opera.

Any Idea what the problem might be?

here is the script code:

$(document).ready(function (){

var itemCount = $('.container div').size();
var itemWidth = $('.container div').width();


$('.container').wrap('<div id="AboutSlider"></div>');

$('#AboutSlider').css({'width':'640px', 'overflow':'hidden', 'position':'relative', 'height':'400px'});

$('#AboutSlider .container').css({'width':itemCount*itemWidth+'px', 'position':'absolute', 'height':'400px'});

$('.container .aboutContent').css({'padding-left':'0px'});

$('#AboutSlider .aboutContent').css({'width':'640px', 'float':'left', 'min-height':'400px'});


$('#AboutNav a').click(function (event) {
    // get the scroll top position
var top = $(window).scrollTop();

event.preventDefault();
$(this).attr('href', $(this).attr('href') + ' ');
var integer = $(this).attr("rel");
$('#AboutSlider .container').animate({
    left: -640 * (parseInt(integer) - 1)
})
$('#AboutNav a').each(function () {
    $(this).removeClass('active');
    if ($(this).hasClass('button' + integer)) {
        $(this).addClass('active')
    }
});
document.location.hash = $(this).attr("href");

    // set the scroll top position to its previous value

setTimeout(function(){$(window).scrollTop(top);},1000);
$(window).scrollTop( top );
});

});

and here the slider html bit:

   <div id="Dienstleistungen">
        <div class="left_column">
        <h2>Meine Dienstleistungen</h2>
        <h3>KOMPETENZEN</h3>
        <ul id="AboutNav">
            <li><h1><a href="#Kompetenzen" class="button1 active noScroll" rel="1" title="Frontend Entwicklung | Sebastian B&ouml;hme">&Uuml;berblick</a></h1></li>
            <li><h1><a href="#Frontend" class="button2 noScroll" rel="2" title="Frontend Entwicklung | Sebastian B&ouml;hme">Frontend Entwicklung</a></h1></li>
            <li><h1><a href="#CMS" class="button3 noScroll" rel="3" title="Content Management Systeme &amp; Online Shops | Sebastian B&ouml;hme">Content Management Systeme &amp; Online Shops</a></h1></li>
            <li><h1><a href="#SEO" class="button4 noScroll" rel="4" title="Suchmaschinenoptimierung (SEO) | Sebastian B&ouml;hme">Suchmaschinenoptimierung (SEO)</a></h1></li>
            <li><h1><a href="#ScreenDesign" class="button5 noScroll" rel="5" title="Screen Design | Sebastian B&ouml;hme">Screen Design</a></h1></li>
            <li><h1><a href="#Hand" class="button6 noScroll" rel="6" title="Alles aus einer Hand | Sebastian B&ouml;hme">Alles aus einer Hand</a></h1></li>
        </ul>
        </div>

        <div class="container">

        <div id="Kompetenzen" class="aboutContent right_columns">
            <h1>&Uuml;berblick</h1>
            <p>Phasellus in massa. Curabitur dolor eros, gravida et, hendrerit ac, cursus non, massa. Aliquam lorem. In hac habitasse platea dictumst. Cras eu mauris. Quisque lacus. Donec ipsum. Nullam vitae sem at nunc pharetra ultricies. Vivamus elit eros, ullamcorper a, adipiscing sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna.
            </p>
            <p>Teng sit amet, porttitor ut, nibh. Maecenas adipiscing mollis massa. Nunc ut dui eget nulla venenatis aliquet. Sed luctus posuere justo. Cras vehicula varius turpis. Vivamus eros metus, tristique sit amet, molestie dignissim, malesuada et, urna.
            </p>
        </div>
    <hr />
        <div id="Frontend" class="aboutContent right_column ">
            <h1>Frontend Entwicklung</h1>
            <p>Phasellus..</p>
        </div>
    <hr />  
        <div id="CMS" class="aboutContent right_column ">
            <h1>Content Management Systeme &amp; Online Shops</h1>
            <p>Phasellus..</p>
        </div>
    <hr />
        <div id="SEO" class="aboutContent right_column ">
            <h1>Suchmaschinenoptimierung (SEO)</h1>
            <p>Phasellus..</p>
        </div>
    <hr />
        <div id="ScreenDesign" class="aboutContent right_column ">
            <h1>Screen Design</h1>
            <p>Phasellus..</p>
        </div>
    <hr />
        <div id="Hand" class="aboutContent right_column">
            <h1>Alles aus einer Hand</h1>
            <p>Curabitur..</p>
        </div>
        </div><!-- AboutSlider -->
    </div><!-- Dienstleistungen -->
  • 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-19T05:04:43+00:00Added an answer on May 19, 2026 at 5:04 am

    Try changing the click handler for the nav to this:

    $('#AboutNav a').click(function (event) {
            // get the scroll top position
        var top = $(window).scrollTop();
    
        event.preventDefault();
        $(this).attr('href', $(this).attr('href') + ' ');
        var integer = $(this).attr("rel");
        $('#AboutSlider .container').animate({
            left: -640 * (parseInt(integer) - 1)
        })
        $('#AboutNav a').each(function () {
            $(this).removeClass('active');
            if ($(this).hasClass('button' + integer)) {
                $(this).addClass('active')
            }
        });
        document.location.hash = $(this).attr("href");
    
            // set the scroll top position to its previous value
        $(window).scrollTop( top );
    });
    

    It grabs the scrollTop position of the window at the beginning, then sets it after you update the hash. Not sure if it will work, but worth a try.

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

Sidebar

Related Questions

I have this menu structure that is used to navigate through content slider panels.
I am using a very light jquery content slider but have no idea how
I have a slider that load all of my content at once. Into a
I have written a simple jquery script for a content slider. My problem is
It seems I have a problem with JQuery Lite Content Slider. I get a
I have some content sliding here. http://www.smallsharptools.com/downloads/jQuery/Slider/slider.html The HTML structure is simple. There is
I have this markup: <div id=slider1> <div class=ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all> <a style=left:
I have found some jQuery codes for show content with slide effect, but none
I have an Fx.Slide instance that loads content via ajax and then slides open
I have content that is being dynamically generated. How to I listen to a

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.