# Importing - Vast Tabber Module into own theme

**URL:** <https://community.hubspot.com/t/importing-vast-tabber-module-into-own-theme/7274>\
**Category:** CMS Development\
**Created:** [January 19, 2018, 3:09pm UTC](https://community.hubspot.com/t/importing-vast-tabber-module-into-own-theme/7274 "2018-01-19T15:09:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stevie-Kv](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevie-kv/32/97206_2.png) [@Stevie-Kv](https://community.hubspot.com/u/Stevie-Kv)\
**Post date:** [January 19, 2018, 3:09pm UTC](https://community.hubspot.com/t/importing-vast-tabber-module-into-own-theme/7274/1 "2018-01-19T15:09:15Z")

</div>

Hi all

I am attempting to make use of the custom vast tabber module in our landing pages.

[http://info.hawktraining.com/professional-solutions/programme-design](http://info.hawktraining.com/professional-solutions/programme-design)

So far I have created a separate .css file and moved the tabber CSS over from the vast style.css, which seems to have worked fine.

```auto
/* Border Radius */
{% macro borderradius(value) -%} 
 -webkit-border-radius: {{ value }};
 -moz-border-radius: {{ value }};
 -o-border-radius: {{ value }};
 -ms-border-radius: {{ value }};
 border-radius: {{ value }};
{%- endmacro %}

/* Tabber Module */
.body-container .tabber-tabs {
 border-bottom: 1px solid #ddd;
 list-style: none;
 padding: 0;
 margin: 0 0 -2px;
}
.tabber-tabs > li {
 float: left;
}
.tabber-tabs > li > a {
 background-color: #fc1cb5;
 color: #fff;
 padding-right: 12px;
 padding-left: 12px;
 margin-right: 2px;
 line-height: 14px;
 padding-top: 8px;
 padding-bottom: 8px;
 line-height: 20px;
 border: 1px solid transparent;
 {{ borderradius("4px 4px 0 0") }}
 text-decoration: none;
 display: block;
}
.tabber-tabs > .active > a,
.tabber-tabs > .active > a:hover,
.tabber-tabs > .active > a:focus {
 color: #fff;
 cursor: default;
 background-color: #3cc8b6;
 border: 1px solid #ddd;
 border-bottom-color: transparent;
}
.tabber-content {
 background: #fff;
 padding: 8px;
 border: 1px solid #ddd;
 {{ borderradius("0 4px 4px 4px") }}
}
.body-container .tabber-content ul {
 padding: 0;
 margin: 0;
}
.tabber-content .block h3 {
 display: none;
}
.blog-tabber .hs-rss-item.hs-with-featured-image .hs-rss-featured-image {
 float: left;
 width: 40%;
 {{ borderradius("4px") }}
}
.blog-tabber .hs-rss-item.hs-with-featured-image .hs-rss-item-text {
 float: right;
 width: 60%;
 padding: 0 0 0 15px;
}
.blog-tabber .hs-rss-item:last-child {
 margin-bottom: 10px;
}

.hs-rss-item.hs-with-featured-image .hs-rss-item-image-wrapper {
display: block;
width: auto;
}

.blog-tabber .hs-rss-item.hs-with-featured-image .hs-rss-featured-image {
float: left;
width: 40%;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
-o-border-radius: 4px;
-ms-border-radius: 4px;
border-radius: 4px;
}

```

Having added in the module to the page, I can set the content within the 2 tabs needed. However as you can see content for tab 1 and 2 appear under tab 1, tab 2 is also unselectable.

```auto
<div class="tabber-wrap">
 <ul class="clearfix tabber-tabs">
 <li class="active"><a>{{ widget.tab_1 }}</a></li>
 <li><a>{{ widget.tab_2 }}</a></li>
 </ul>
 <div class="tabber-content">
 <div class="tab-pane active">{{ widget.tab_1_content }}</div>
 <div class="tab-pane" id="tab-2">{{ widget.tab_2_content }}</div>
 </div>
</div>

```

Any help would be greatly appreciated, I assume I am missing something very simple!

Steve

---

<div class="post-metadata">

**Author:** ![ryancomsat](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ryancomsat/32/76793_2.png) [@ryancomsat](https://community.hubspot.com/u/ryancomsat)\
**Post date:** [January 25, 2018, 3:58am UTC](https://community.hubspot.com/t/importing-vast-tabber-module-into-own-theme/7274/2 "2018-01-25T03:58:23Z")

</div>

Hi Hawk Steve,

I think you must import the js in the footer.

Try this code

```auto
 /** 
 * Tabber
 */

 // Hide all panes initially except for the first 'active' one
 $(".tab-pane").not(".active").hide();

 // Loop through all the tabber panes
 $('.tabber-content .tab-pane').each(function(i, el){

 // Set the ID
 $(el).attr("id", "tab-" + i);

 });

 // Loop through all the tabber anchors
 $(".tabber-tabs a").each(function(i, el){

 // Set HREF Using the Index
 $(el).attr("href", "#tab-" + i);

 // Variable for the Pane ID based on the HREF
 var ID = $(el).attr("href");

 // Click Function
 	$(this).click(function(e){

 // Prevent default functionality of the anchor
 		e.preventDefault();

 // If the parent LI does not have the active class
 		if(!$(this).parent().hasClass("active")){

 // Give the parent LI the active state styles and hide all other panes
 			$(this).parent().addClass("active").siblings().removeClass("active");

 // Fade in the corresponding pane and hide all other panes
 			$(ID).fadeIn().siblings().hide();
 		}
 	});

 });

```

Thanks,

Comsat

---

<div class="post-metadata">

**Author:** ![Stevie-Kv](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevie-kv/32/97206_2.png) [@Stevie-Kv](https://community.hubspot.com/u/Stevie-Kv)\
**Post date:** [January 25, 2018, 9:29am UTC](https://community.hubspot.com/t/importing-vast-tabber-module-into-own-theme/7274/3 "2018-01-25T09:29:45Z")

</div>

Hi Comsat

Perfect! I knew JS was involved but couldn’t find it anywhere on existing support pages or old vast template pages to bring across.

Could you let me know where you found the JS for this? I am guessing I can find the rest of the JS for the other custom vast modules (when I come to bringing those across too).

Thank you very much.

Steve

---

<div class="post-metadata">

**Author:** ![ryancomsat](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ryancomsat/32/76793_2.png) [@ryancomsat](https://community.hubspot.com/u/ryancomsat)\
**Post date:** [January 25, 2018, 10:36pm UTC](https://community.hubspot.com/t/importing-vast-tabber-module-into-own-theme/7274/4 "2018-01-25T22:36:46Z")

</div>

Hi Hawk Steeve,

You can find this vast-main.js to Coded Files \> page \> Vast\_Theme \> vast-main.js

or public url {{ get\_public\_template\_url(“custom/page/Vast\_Theme/vast-main.js”) }}

Thanks,

Comsat
