Given the following:
<div id="#my-container">
<div class="title">Companies</div>
<div class="tab active tab-apple">Apple</div>
<div class="tab tab-google">Google</div>
</div>
- When page is loaded without any tab clicks yet, whichever tab with the default active class, needs to go in the
.titlediv. For the example above,<div class="title">Apple</div> - On click of a tab, the class is switched to active, and vue.js needs to update the
.titlediv once again.
How can this be done with vue.js? I've tried but not able to get it to work as intended.