HTML and CSS Reference
In-Depth Information
Let us continue editing the main.js file and add in the code that would enable this.
First, let's add the class names that we will use to control the styling, and the hiding/
showing behavior within our code. The code for this functionality is as follows:
<nav class="t-tab__nav">
<a class="t-tab__navitem--active
t-tab__navitemjs-tabitem" href="#day-1">Day
1</a>
<a class="t-tab__navitemjs-tabitem"
href="#day-2">Day 2</a>
</nav>
Now, we shall write the code that will show the element we clicked on. This code is
as follows:
var $navlinks = $('#lineup .js-tabitem');
var $tabs = $('.t-tab__body');
Search WWH ::




Custom Search