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

82
Views
how to show div after click only for few seconds

I'm working with BootstrapVue.

I have - I think - a very simple question, but I could not find anything that worked for me. I have a <b-button> which I want to click and than the second <div> should be shown but only for 3 Seconds.

I want to have my code without jQuery - how can I achieve that?

Thank You!

<div class="row mb-3">
  <div class="col-8 col-md-6 mt-4 ml-1">
    <b-button @click="clickIt()"</b-button>
  </div>
  <div class="col-2 col-md-5 mt-4">
    <p>You've clicked it!</p>
  </div>
</div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I hope this should resolve your problem.

<div class="row mb-3">
  <div class="col-8 col-md-6 mt-4 ml-1">
    <b-button @click="clickIt()"</b-button>
  </div>
  <div v-if="isClicked" class="col-2 col-md-5 mt-4">
    <p>You've clicked it!</p>
  </div>
</div>

export default {
  data: () => {
    return { isClicked: false };
  },
  methods: {
    clickIt() {
      this.isClicked = true
      setTimeout(() => {
        this.isClicked = false;
      }, 3000);
    },
  },
};
about 4 years ago · Juan Pablo Isaza Report
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!