<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HubSpot Tabber not working in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455682#M23929</link>
    <description>&lt;P&gt;Preview Page -&amp;nbsp;&lt;A href="https://www.vistair.com/-temporary-slug-7d7aeaff-e950-441d-87be-ee4521b49610?hs_preview=fsKIfGbo-50328930343" target="_blank" rel="noopener"&gt;https://www.vistair.com/-temporary-slug-7d7aeaff-e950-441d-87be-ee4521b49610?hs_preview=fsKIfGbo-50328930343&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Page based on giant template&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 13:56:48 GMT</pubDate>
    <dc:creator>simonp</dc:creator>
    <dc:date>2021-07-07T13:56:48Z</dc:date>
    <item>
      <title>HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/434501#M22885</link>
      <description>&lt;P&gt;I downloaded the HubSpot Tabber from the marketplace.&lt;/P&gt;
&lt;P&gt;We're going to use it for a podcast for our clients.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It works when I try it on the HubSpot Preview and Editor, but when I open a new tab or the live page, it won't work and it won't stop scrolling to the top whenever I click on the second tab.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this might be a problem with JS, I just started learning, so I don't know how to catch it quickly. Client needs it for this week, so any help is deeply appreciated. Thanks in advance for your time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Live page example here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.cmtc.com/shiftinggears" target="_blank" rel="noopener"&gt;https://www.cmtc.com/shiftinggears&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[----------- Module HTML&amp;nbsp;-----------]&lt;/P&gt;
&lt;P&gt;&amp;lt;div class="hs-tabs"&amp;gt;&lt;BR /&gt;&amp;lt;ul class="hs-tabs__nav"&amp;gt; &lt;BR /&gt;{% for item in module.tab -%}&lt;BR /&gt;&amp;lt;li&amp;gt;&amp;lt;a href="#tab-{{ loop.index }}" class="hs-tabs__navitem{% if loop.index == 1 %} hs-tabs__navitem--active{% endif %}"&amp;gt;{% inline_text field="tab_label" value="{{ item.tab_label }}" %}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;BR /&gt;{%- endfor %}&lt;BR /&gt;&amp;lt;/ul&amp;gt;&lt;BR /&gt;{% for item in module.tab %}&lt;BR /&gt;&amp;lt;div id="tab-{{ loop.index }}" class="hs-tabs__item{% if loop.index == 1 %} hs-tabs__item--active{% endif %}"&amp;gt;{% inline_rich_text field="content" value="{{ item.content }}" %}&amp;lt;/div&amp;gt; &lt;BR /&gt;{% endfor %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;
&lt;P&gt;{% require_css %}&lt;BR /&gt;&amp;lt;style&amp;gt;&lt;BR /&gt;.hs-tabs__navitem:not(.hs-tabs__navitem--active) {&lt;BR /&gt;background-color: {{ module.tab_bg_color.color }};&lt;BR /&gt;color: {{ module.tab_text_color.color }};&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/style&amp;gt;&lt;BR /&gt;{% end_require_css %}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[-------- Module CSS----------]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.hs-tabs__item{&lt;BR /&gt;display: none;&lt;BR /&gt;padding: 20px;&lt;BR /&gt;border: 1px solid #efefef;&lt;BR /&gt;}&lt;BR /&gt;.hs-tabs__item--active{&lt;BR /&gt;display: block;&lt;BR /&gt;}&lt;BR /&gt;.hs-tabs__item img{ &lt;BR /&gt;/* Protect images from overflowing the tab */ &lt;BR /&gt;max-width: 100%;&lt;BR /&gt;height: auto;&lt;BR /&gt;}&lt;BR /&gt;.hs-tabs__nav{&lt;BR /&gt;list-style: none;&lt;BR /&gt;margin: 0;&lt;BR /&gt;padding: 0;&lt;BR /&gt;margin-bottom: -1px;&lt;BR /&gt;}&lt;BR /&gt;.hs-tabs__nav li{&lt;BR /&gt;display: inline-block;&lt;BR /&gt;}&lt;BR /&gt;.hs-tabs__navitem{&lt;BR /&gt;text-decoration: none;&lt;BR /&gt;display: block;&lt;BR /&gt;padding: 20px;&lt;BR /&gt;border: 1px solid #efefef;&lt;BR /&gt;border-bottom: none;&lt;BR /&gt;}&lt;BR /&gt;.hs-tabs__navitem--active{&lt;BR /&gt;color: #000;&lt;BR /&gt;background: #fff;&lt;BR /&gt;}&lt;BR /&gt;/* fix for hubspot injected div */&lt;BR /&gt;.hs-tabs__navitem *{&lt;BR /&gt;pointer-events: none;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[------------- Module JS-------------]&lt;/P&gt;
&lt;P&gt;function tabs(context){&lt;BR /&gt;var nav = context.querySelector('.hs-tabs__nav'),&lt;BR /&gt;tabs = nav.querySelectorAll('a'),&lt;BR /&gt;content = context.querySelectorAll('.hs-tabs__item'),&lt;BR /&gt;switchTabs = function(id){&lt;BR /&gt;removeClassAll(content, 'hs-tabs__item--active');&lt;BR /&gt;context.querySelector(id).classList.add('hs-tabs__item--active');&lt;BR /&gt;},&lt;BR /&gt;tabEvent = function(event){&lt;BR /&gt;if(event.target.nodeName == "A"){&lt;BR /&gt;event.preventDefault();&lt;BR /&gt;switchTabs(event.target.getAttribute('href'));&lt;BR /&gt;removeClassAll(tabs, 'hs-tabs__navitem--active');&lt;BR /&gt;event.target.classList.add('hs-tabs__navitem--active');&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;removeClassAll = function(elemArr, className){&lt;BR /&gt;for(var i = elemArr.length; i--;){&lt;BR /&gt;elemArr[i].classList.remove(className);&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;init = (function(){&lt;BR /&gt;nav.addEventListener('click', tabEvent);&lt;BR /&gt;})();&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;var tabbers = document.querySelectorAll('.hs-tabs');&lt;BR /&gt;for(var i = tabbers.length; i--;){&lt;BR /&gt;tabs(tabbers[i]);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 17:42:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/434501#M22885</guid>
      <dc:creator>KarenBP</dc:creator>
      <dc:date>2021-05-05T17:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/435005#M22920</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/148095"&gt;@KarenBP&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like you're smooth scrolling function in the Global.js file is causing this issue.&lt;/P&gt;
&lt;P&gt;In the screen shot below you can see that the function is targeting all anchor tags that have an href containing a "#":&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Kevin-C_0-1620319022180.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/42191i2F7F0170903BECB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Kevin-C_0-1620319022180.png" alt="Kevin-C_0-1620319022180.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;To test that this was the issue I added the ID "responsive-menu-button" which as you can see excludes it from the smooth scrolling function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The fastest solution might be to add the "hs-tabs__navitem" class to the smoothscroll&amp;nbsp;function's exclusion list. The ".not" function:&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;// smooth scrolling
        if ($('.horizontal-tab-wrapper').length === 0 || $('.hs-content-path-growth-pipeline-assessment').length === 0) {
            $('a[href*="#"]').not('#responsive-menu-button, .hs-tabs__navitem').click(function() {
                if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') &amp;amp;&amp;amp; location.hostname == this.hostname) {
                  var target = $(this.hash);
                  target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
                  console.log(target)
                  if (target.length) {
                    $('html,body').animate({
                      scrollTop: target.offset().top
                    }, 1000);
                    return false;
                  }
                }
            });
        }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;FYI: I was not able to test this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this gets you moving!&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 16:47:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/435005#M22920</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2021-05-06T16:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/435135#M22928</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt;&amp;nbsp;this worked!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you so much for your clarification and very quick response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The screenshot and js code were super helpful.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":star:"&gt;⭐&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 23:37:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/435135#M22928</guid>
      <dc:creator>KarenBP</dc:creator>
      <dc:date>2021-05-06T23:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455655#M23925</link>
      <description>&lt;P&gt;SimilAar problem - just trying to find the global.js file or what file gets added to the compiled js file&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:10:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455655#M23925</guid>
      <dc:creator>simonp</dc:creator>
      <dc:date>2021-07-07T13:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455656#M23926</link>
      <description>&lt;P&gt;Hello Karen - got a similar problem - struggling to locate the relevant js file&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:12:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455656#M23926</guid>
      <dc:creator>simonp</dc:creator>
      <dc:date>2021-07-07T13:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455679#M23927</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/57528"&gt;@simonp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you could post a link i'm sure we can help ya dig it up!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:53:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455679#M23927</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2021-07-07T13:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455682#M23929</link>
      <description>&lt;P&gt;Preview Page -&amp;nbsp;&lt;A href="https://www.vistair.com/-temporary-slug-7d7aeaff-e950-441d-87be-ee4521b49610?hs_preview=fsKIfGbo-50328930343" target="_blank" rel="noopener"&gt;https://www.vistair.com/-temporary-slug-7d7aeaff-e950-441d-87be-ee4521b49610?hs_preview=fsKIfGbo-50328930343&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Page based on giant template&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:56:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455682#M23929</guid>
      <dc:creator>simonp</dc:creator>
      <dc:date>2021-07-07T13:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455686#M23930</link>
      <description>&lt;P&gt;Preview Page -&amp;nbsp;&lt;A href="https://www.vistair.com/-temporary-slug-7d7aeaff-e950-441d-87be-ee4521b49610?hs_preview=fsKIfGbo-50328930343" target="_blank" rel="noopener nofollow noreferrer"&gt;https://www.vistair.com/-temporary-slug-7d7aeaff-e950-441d-87be-ee4521b49610?hs_preview=fsKIfGbo-503...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Page based on giant template&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:58:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455686#M23930</guid>
      <dc:creator>simonp</dc:creator>
      <dc:date>2021-07-07T13:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455709#M23933</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/57528"&gt;@simonp&lt;/a&gt; So you're function is located in the main.js&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinC_0-1625669599545.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/45883i7B2BBDDA43D93F9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinC_0-1625669599545.png" alt="KevinC_0-1625669599545.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 14:53:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455709#M23933</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2021-07-07T14:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot Tabber not working</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455722#M23935</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="simonp_0-1625669889198.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/45884iE69D21387A840D31/image-size/medium?v=v2&amp;amp;px=400" role="button" title="simonp_0-1625669889198.png" alt="simonp_0-1625669889198.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks Kevin i dont seem to see main.js in the html inspector altough as i look with hubspot design i can see main.js with the theme folder&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="simonp_1-1625670549965.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/45885iFF7D0D77716338E3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="simonp_1-1625670549965.png" alt="simonp_1-1625670549965.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;THIS LOOKS SUSPICIOUSLY LIKE SMOOTH SCROLLING SCRIPT&amp;nbsp; i try and add this to a cloneed version of the script&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="simonp_2-1625671578595.png" style="width: 720px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/45886i7AA635B9DBF96392/image-dimensions/720x234?v=v2" width="720" height="234" role="button" title="simonp_2-1625671578595.png" alt="simonp_2-1625671578595.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 15:28:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubSpot-Tabber-not-working/m-p/455722#M23935</guid>
      <dc:creator>simonp</dc:creator>
      <dc:date>2021-07-07T15:28:08Z</dc:date>
    </item>
  </channel>
</rss>

