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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:58:46+00:00 2026-05-16T16:58:46+00:00

Not sure I’m really using the accordion widget as it’s meant to be used

  • 0

Not sure I’m really using the accordion widget as it’s meant to be used but I’ve automated the showing of the panels so that site viewers can see each panel without clicking.

Problem is if the user scrolls down while the accordion is cycling, the page jumps back up to the next opening panel. I’ve tried all sorts of return falses and tried deleting the href tags in the html.

Here’s minimal code:

<script type="text/javascript">
$(function(){
 $("#accordion").accordion({ header: "h3"});
});
itemid=0;
setInterval ("doSomething()", 2000 );
function doSomething(){
 itemid++;
 $("#accordion").accordion( "activate" , itemid);
 if (itemid==2){itemid=-1};
}   
</script>
</head>
<body>
<div id="accordion">
 <div>
  <h3 style="font-weight:bold;"><a href="#">title1</a></h3>
  <div>content1</div>
 <div>
  <h3 style="font-weight:bold;"><a href="#">title2</a></h3>
  <div>content2</div>
 </div>
 <div>
  <h3 style="font-weight:bold;"><a href="#">title3</a></h3>
  <div>content3</div>
 </div>
</div>
<br />
....

Anyone have ideas for me to try?

Thanks.

  • 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-16T16:58:48+00:00Added an answer on May 16, 2026 at 4:58 pm

    This is a browser rendering “issue”. You can replicate it using Firebug. Notice if you scroll down the page when there is a lot of content and you hide the first content by setting the css property to display:none (basically what it is animated to do). Then the page will automatically jump to the top.

    One option is to store the current scroll position pre-animation and then scroll to that position once the animation finishes, although this is quite ugly.

    The other option is to restrict the height of your content to be less than the average page size, you would then have the scrollbar on the active content rather than the whole screen.

    IMHO, either way it’s not going to look nice. If I were a designer I would suggest a design rethink. If you are going to have large amounts of information I wouldn’t be sticking it in an auto changing accordion.

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

Sidebar

Related Questions

Not sure if this is a big deal. But wondering why when the site
Not sure if that the right title for the question, but what I'm trying
Not sure what parallel programing means... but I have two thoughts of that Process
Not sure if this is possible but I have a slideshow on my site
Not sure how to word this but my problem is that my fields will
Not sure if im just being stupid or something but here goes i work
Not sure how to ask this, but i'll give it a try: I have
not sure what I'm missing here, but i keep getting the error. SQLSTATE[HY093]: Invalid
Not sure if this is the correct Stack Exchange website but here goes.. A
Not sure this is a known issue. I’m using VS2012 RC (Ultimate), and Win8

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.