# Tab Menu

**URL:** <https://community.hubspot.com/t/tab-menu/12066>\
**Category:** CMS Development\
**Created:** [December 17, 2018, 11:51am UTC](https://community.hubspot.com/t/tab-menu/12066 "2018-12-17T11:51:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shaykoo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shaykoo/32/99730_2.png) [@Shaykoo](https://community.hubspot.com/u/Shaykoo)\
**Post date:** [December 17, 2018, 11:51am UTC](https://community.hubspot.com/t/tab-menu/12066/1 "2018-12-17T11:51:55Z")

</div>

Hi, I have a tab module in my template and I need to switch tab colors upon clicking. For example if I have 2 tabs and if I click on first tab then the background color of the tab would change leaving other tab with different color and vice versa. I already gave both of them particular IDs and wrote a Jquery(But I don’t know where to clace it). Jquery code:

\<script type=“text/javascript”\>// \<![CDATA[  
$(document).ready(function){  
$(“#btn1”).bind(‘click’, function(event){  
$(“#btn1”).css({‘background-color’: ‘#ff3366’, ‘color’:‘#fff’});  
$(“#btn2”).css({‘background-color’: ‘d5e2e9’, ‘color’:‘#000’});  
});  
});  
$(document).ready(function(){  
$(“#btn2”).bind(‘click’, function(event){  
$(“#btn1”).css({‘background-color’: ‘d5e2e9’, ‘color’:‘#000’});  
$(“#btn2”).css({‘background-color’: ‘#ff3366’, ‘color’:‘#fff’});  
});  
})  
// ]]\>\</script\>

this is the preview link of the page where there are 2 tabs in the hero section:  
[https://www.fylehq.com/pricingfyle?hs\_preview=AIyVvSBm-6647959624](https://www.fylehq.com/pricingfyle?hs_preview=AIyVvSBm-6647959624)

Thanks In Advance

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [December 17, 2018, 1:38pm UTC](https://community.hubspot.com/t/tab-menu/12066/2 "2018-12-17T13:38:01Z")

</div>

@Shaykoo

There are a number of ways to attached JS and other ancillary files to you template. Specifically for JS there are 2 options in the “Edit” panel of the design tools.

See the image below.

 ![Screen Shot 2018-12-17 at 8.28.13 AM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/2/8/28bb0cc3a40373e82061179073a4f4d14f286a01.png)
