<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>accordion Archives &#8212; Stampede: the strategic design &amp; technology company</title>
	<atom:link href="https://stampede-design.com/blog/tag/accordion/feed/" rel="self" type="application/rss+xml" />
	<link>https://stampede-design.com/blog/tag/accordion/</link>
	<description>We are creating better worlds though thoughtful design and technology. Connect with us!</description>
	<lastBuildDate>Tue, 07 Apr 2026 09:05:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.7</generator>

<image>
	<url>https://stampede-design.com/wp-content/uploads/2024/02/cropped-Stampede-Favicon-old-32x32.png</url>
	<title>accordion Archives &#8212; Stampede: the strategic design &amp; technology company</title>
	<link>https://stampede-design.com/blog/tag/accordion/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Improving navigation on large accordion content panels</title>
		<link>https://stampede-design.com/blog/improving-navigation-on-large-accordion-content-panels/</link>
					<comments>https://stampede-design.com/blog/improving-navigation-on-large-accordion-content-panels/#comments</comments>
		
		<dc:creator><![CDATA[Shaiful Borhan]]></dc:creator>
		<pubDate>Mon, 29 Apr 2013 17:46:35 +0000</pubDate>
				<category><![CDATA[Field Notes]]></category>
		<category><![CDATA[accordion]]></category>
		<category><![CDATA[front-end development]]></category>
		<category><![CDATA[navigation UX]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ux]]></category>
		<guid isPermaLink="false">https://stampede-design.com/blog/?p=3602</guid>

					<description><![CDATA[<p>Accordions are one way to improve content presentation in a website, but when they get vertically huge they can be quite a navigational nightmare. Shaiful shows you the solution using an awesome jQuery workaround.</p>
<p>The post <a href="https://stampede-design.com/blog/improving-navigation-on-large-accordion-content-panels/">Improving navigation on large accordion content panels</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p class="lead">Whether you are using them for menus or displaying content, the accordions are cool. However in special cases when your accordion grows vertically huge, navigating through the panels can be slightly counterintuitive.</p>

<p>The issue occurs when you&#8217;ve reached the bottom of a very tall panel, and you clicked on the next panel switch to open the respective panel (which happens to be a very tall panel too). The scrollbar will stay at the same position while this new panel opens and the last panel closes and ends up putting your view at the bottom of the content of the new panel.</p>

<p>I have created a quick demo of this issue <a href="https://stampede-design.com/demo/shaiful/large-accordion/large-accordion.html">here</a>. I&#8217;m using the awesome jQueryUI library to produce the accordion by the way. Click on the panel switch for <em>Section 2</em> to expand it. Then scroll down until you see the panel switch for <em>Section 3</em> and click on it. You will have to scroll up to get to the beginning of the content of <em>Section 3</em>. Not very nice.</p>

<p>To improve the navigation, a simple auto-scroll feature can be added to the accordion that brings the browser viewport to the top of the opened panel. In jQueryUI, we can take advantage of the <em>activate</em> event hook to trigger the auto-scroll. As for the scrolling itself, we can simply use jQuery&#8217;s <em>animate</em> function to add a smooth scrolling effect for a nice touch.</p>

<p>The final accordion code is as follows.</p>

<pre class="brush: jscript; title: ; notranslate">
$( &quot;#accordion&quot; ).accordion({
	heightStyle: &quot;content&quot;,
	collapsible: true,
	active: false,
	activate: function( event, ui ) {
		if(!$.isEmptyObject(ui.newHeader.offset())) {
			$('html:not(:animated), body:not(:animated)').animate({ scrollTop: ui.newHeader.offset().top }, 'slow');
		}
	}
});
</pre>

<p>Check out the updated demo <a href="https://stampede-design.com/demo/shaiful/large-accordion/large-accordion-fix.html">here</a>.</p>

<p>Let me know what you think of this workaround. Have a nice day!</p><p>The post <a href="https://stampede-design.com/blog/improving-navigation-on-large-accordion-content-panels/">Improving navigation on large accordion content panels</a> appeared first on <a href="https://stampede-design.com">Stampede: the strategic design &amp; technology company</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://stampede-design.com/blog/improving-navigation-on-large-accordion-content-panels/feed/</wfw:commentRss>
			<slash:comments>19</slash:comments>
		
		
			</item>
	</channel>
</rss>
