Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
How to set sidebar menu active when clicked in vue.js?

I want to set sidebar menu active when clicked. Now only the first menu is selected as active. If other menus are selected, the first menu still remains as active menu. How to implement this ?

My code:

<div id="mobile_sidebar_display">
  <div
    class="logo_section d-flex justify-content-center align-items-center"
  >
    <a v-on:click="closeSideDrawer" :href="base + '/'">
      <img src="../../assets/images/logo_2.svg" class="w-100" />
    </a>
  </div>
  <div style="height: 10px"></div>
  <a
    v-on:click="closeSideDrawer"
    class="sidebar_link active"
    :href="base + '/'"
    ><i class="fas fa-home"></i> <span class="ml-2">Home</span></a
  >

  <a v-on:click="closeSideDrawer" class="sidebar_link" href="#"
    ><i class="far fa-user"></i> <span class="ml-2">Courses</span></a
  >
  <router-link class="sidebar_link" to="/QuizGrid"
    ><i class="fas fa-puzzle-piece"></i>
    <span v-on:click="closeSideDrawer" class="ml-2"
      >Puzzles</span
    ></router-link
  >
</div>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!