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

257
Views
Bulma: make links bold, wait 1000 ms, then make them un-bold

Using vanilla javascript and bulma.css, how can I unhide a span, make all the links in the span bold, then after a given amount of time (say, 1000 ms), take away the bold font weight. The first part, unhiding and making the links bold works fine using the following code:

function unhide_bold_unbold() {
    mode_sents = document.getElementsByClassName('kanji-sent')
    for (let i = 0; i < mode_sents.length; i++) {
        mode_sents[i].classList.remove('is-hidden')
        // Bold all links
        links = mode_sents[i].getElementsByTagName('a')
        for (let j = 0; j < links.length; j++) {
            links[j].classList.add('has-text-weight-bold')
        }
    }
}

I tried adding the following at the end of the function, but it just delays the unhiding by 1000 ms, and the links never look bold.

    sleep(wait_ms)
    for (let i = 0; i < mode_sents.length; i++) {
        links = mode_sents[i].getElementsByTagName('a')
        for (let j = 0; j < links.length; j++) {
            links[j].classList.remove('has-text-weight-bold')
        }
    }

...which uses the following function:



function sleep(milliseconds) {
  const date = Date.now();
  let currentDate = null;
  do {
    currentDate = Date.now();
  } while (currentDate - date < milliseconds);
}

How can I make bulma's class update the font weight, then wait, then remove the bold font weight?

<span class="kanji-sent is-hidden"><a onclick="show_kanji_data('彼')">彼</a>等は皆、この<a onclick="show_kanji_data('曇')">曇</a>天に押しすくめられたかと思う程、揃って背が低かった。</span>
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!