<?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"

			>

	<channel>

		<title>Links open tabs. How do I do the same with accordions? &#8211; Themeco Community</title>
		<atom:link href="https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/feed/" rel="self" type="application/rss+xml" />
		<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/feed/</link>
		<description></description>
		<lastBuildDate>Tue, 14 Oct 2025 05:23:20 +0000</lastBuildDate>
		<generator>https://bbpress.org/?v=2.6.14</generator>
		<language>en-US</language>

		
														
					
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-238984</guid>
					<title><![CDATA[Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-238984</link>
					<pubDate>Tue, 31 Mar 2015 13:34:32 +0000</pubDate>
					<dc:creator>meathead</dc:creator>

					<description>
						<![CDATA[
						<p>I have some accordions and some tabs on my home page <a href="http://46.32.241.211/djtees.com/store" rel="nofollow">DJTees</a><br />
I have links which open my tabs using this query:-</p>
<pre><code>jQuery(function($){
  
  $(document).ready(function() {
     x_scroll_to_tab($, $(&#039;.x-nav-tabs .x-nav-tabs-item a[href=&quot;#&#039; + location.href.split(&quot;#&quot;).slice(-1)[0] + &#039;&quot;]&#039;) );
  });

  $(&#039;.link_to_tab&#039;).click(function(e){
    e.preventDefault();
    x_scroll_to_tab($, $(&#039;.x-nav-tabs .x-nav-tabs-item a[href=&quot;#&#039; + $(this).attr(&#039;href&#039;).split(&quot;#&quot;).slice(-1)[0] + &#039;&quot;]&#039;));
  });

});

function x_scroll_to_tab($, tab_nav) {
            $(tab_nav).click();
            $(&#039;html,body&#039;).animate({scrollTop: jQuery(tab_nav).offset().top - ( jQuery(&#039;.x-navbar&#039;).height() + 0 ) - jQuery(&#039;header.masthead&#039;).height() },700 ,&#039;swing&#039;);
}

var $document = jQuery(document),
    $nav = jQuery(&#039;.home .x-navbar&#039;),
    className = &#039;x-navbar-fixed-top&#039;;

$document.scroll(function() {
  if ($document.scrollTop() &gt;= 50) {
    $nav.addClass(className);
  } else {
    $nav.removeClass(className);
  }
});  </code></pre>
<p>and class link_to_tab. All the tabs have #tab-1 #tab-2 etc, anchors.</p>
<p>I need to do the same with my accordions.<br />
Here is the test link to scroll to, and open the accordion on my drop down menu:-</p>
<p><code>&lt;li&gt;&lt;a href=&quot;#collapse-1&quot; class=&quot;link_to_tab&quot;&gt;What we&#039;re about&lt;/a&gt;&lt;/li&gt;</code></p>
<p>How do I alter the query to link/open the accordion?<br />
Thanks.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-239118</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-239118</link>
					<pubDate>Tue, 31 Mar 2015 16:19:11 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>Thanks for writing in!</p>
<p>Please review this thread: <a href="https://theme.co/x/member/forums/topic/open-accordion-from-link/#post-65132" rel="nofollow">https://theme.co/x/member/forums/topic/open-accordion-from-link/#post-65132</a></p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240141</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240141</link>
					<pubDate>Wed, 01 Apr 2015 18:34:46 +0000</pubDate>
					<dc:creator>meathead</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks, but I have tried the code in the link suggested, but it didn&#8217;t work for accordions or tabs &#8211; and yes, I changed the id&#8217;s etc. to match the code. (Since changed them back)<br />
The code I sent in my first question works for my tabs, do you know what I can add to this to make it link to the accordions?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240258</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240258</link>
					<pubDate>Wed, 01 Apr 2015 21:50:08 +0000</pubDate>
					<dc:creator>Friech</dc:creator>

					<description>
						<![CDATA[
						<p>Hi There,</p>
<p>Thanks for writing in! Regretfully, we cannot provide support for a third party scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer&#8217;s script.</p>
<p>Thank you for your understanding.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240555</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240555</link>
					<pubDate>Thu, 02 Apr 2015 07:26:52 +0000</pubDate>
					<dc:creator>meathead</dc:creator>

					<description>
						<![CDATA[
						<p>The script I used was suggested by your staff/experts to someone else on your forum <a href="https://theme.co/x/member/forums/topic/links-to-nav-tabs/page/2/" rel="nofollow">https://theme.co/x/member/forums/topic/links-to-nav-tabs/page/2/</a> for answering a similar question, so<strong> it is not a third party script</strong>.<br />
This is why I used it.</p>
<p>I had already tried the other script <a href="https://theme.co/x/member/forums/topic/open-accordion-from-link/#post-65132" rel="nofollow">https://theme.co/x/member/forums/topic/open-accordion-from-link/#post-65132</a> that you suggested, but the question/answers were very fractured and specific to the other person&#8217;s question.<br />
I really need a very clear answer/script that directly applies to <strong>my</strong> question.<br />
The script you suggested does not work.<br />
Could it be out of date due to updates?</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240575</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240575</link>
					<pubDate>Thu, 02 Apr 2015 08:12:26 +0000</pubDate>
					<dc:creator>Lely</dc:creator>

					<description>
						<![CDATA[
						<p>Hello There,</p>
<p>Thank you for your patience and sorry the link we have suggested didn&#8217;t work for you.<br />
Please check if your plugins is updated.<br />
Meanwhile, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:</p>
<p>– Link to your site<br />
– WordPress Admin username / password</p>
<p><strong>Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.</strong></p>
<p>Thanks.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240621</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240621</link>
					<pubDate>Thu, 02 Apr 2015 10:19:52 +0000</pubDate>
					<dc:creator>meathead</dc:creator>

					<description>
						<![CDATA[
						This reply has been marked as private.						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240651</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240651</link>
					<pubDate>Thu, 02 Apr 2015 11:21:11 +0000</pubDate>
					<dc:creator>Zeshan</dc:creator>

					<description>
						<![CDATA[
						<p>Hi there,</p>
<p>I&#8217;ve updated your original code to work with accordions and added in your Customizer. I&#8217;ve also created a test page: <a href="http://46.32.241.211/djtees.com/store/example-accordion-link/" rel="nofollow">http://46.32.241.211/djtees.com/store/example-accordion-link/</a></p>
<p>The code for accordions is following:</p>
<pre><code>jQuery(function($){
  
  $(document).ready(function() {
    x_scroll_to_accordion($, $(&#039;.x-accordion-toggle[href=&quot;#&#039; + location.href.split(&quot;#&quot;).slice(-1)[0] + &#039;&quot;]&#039;) );
  });

  $(&#039;.link_to_accordion&#039;).click(function(e){
    e.preventDefault();
    x_scroll_to_accordion($, $(&#039;.x-accordion-toggle[href=&quot;#&#039; + $(this).attr(&#039;href&#039;).split(&quot;#&quot;).slice(-1)[0] + &#039;&quot;]&#039;));
  });

});

function x_scroll_to_accordion($, acc_nav) {
  $(acc_nav).click();
  $(&#039;html,body&#039;).animate({scrollTop: jQuery(acc_nav).offset().top - ( jQuery(&#039;.x-navbar&#039;).height() + 0 ) - jQuery(&#039;header.masthead&#039;).height() },700 ,&#039;swing&#039;);
}

var $document = jQuery(document),
    $nav = jQuery(&#039;.home .x-navbar&#039;),
    className = &#039;x-navbar-fixed-top&#039;;

$document.scroll(function() {
  if ($document.scrollTop() &gt;= 50) {
    $nav.addClass(className);
  } else {
    $nav.removeClass(className);
  }
});  
</code></pre>
<p>You need to follow the same method as for tabs.</p>
<p>Thanks!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240666</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240666</link>
					<pubDate>Thu, 02 Apr 2015 11:53:47 +0000</pubDate>
					<dc:creator>meathead</dc:creator>

					<description>
						<![CDATA[
						<p>Thanks very much for your help, works great now!</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240671</guid>
					<title><![CDATA[Reply To: Links open tabs. How do I do the same with accordions?]]></title>
					<link>https://theme.co/archive/forums/topic/links-open-tabs-how-do-i-do-the-same-with-accordions/#post-240671</link>
					<pubDate>Thu, 02 Apr 2015 12:08:32 +0000</pubDate>
					<dc:creator>Nico</dc:creator>

					<description>
						<![CDATA[
						<p>You&#8217;re most welcome.</p>
<p>Let us know if you need anything else.</p>
<p>Cheers!</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

