Skip to content

Instantly share code, notes, and snippets.

View titusdecali's full-sized avatar
🖖

Titus Decali titusdecali

🖖
View GitHub Profile
@titusdecali
titusdecali / VueTabs.vue
Last active March 2, 2020 04:10
Tabbed Section in Vue using class binding
<template>
<div id="tabs" class="container">
<div class="tabs">
<a v-on:click="activetab=1" v-bind:class="[ activetab === 1 ? 'active' : '' ]">Tab 1</a>
<a v-on:click="activetab=2" v-bind:class="[ activetab === 2 ? 'active' : '' ]">Tab 2</a>
<a v-on:click="activetab=3" v-bind:class="[ activetab === 3 ? 'active' : '' ]">Tab 3</a>
</div>
<div class="content">