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

161
Views
How to highlight specific title in html when I used js for marque
<!-- javascript -->
const middle = document.getElementById("middle");
const middle1 = document.getElementById("middle1");

animate(middle);
animate(middle1);
  
function animate(element) {
    let elementWidth = element.offsetWidth;
    let parentWidth = element.parentElement.offsetWidth;
    let flag = 0;
  
    setInterval(() => {
        element.style.marginLeft = --flag + "px";
  
        if (elementWidth == -flag) {
            flag = parentWidth;
        }
    }, 10);
}

<!-- this is html itself -->

    <div id="main">
        <p class="middle" id="middle">
            Welcome to my Spectacular Show!
        </p>
        <p class="middle" id="middle1">
            Time for the show is 6:59PM EST on May 28,2022
        </p>

    </div>

This is js I have for creating marque in my HTML(have assignment), I need to figure out the way how to highlight the time and date only! Please help:)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can add them inside strong tag

<div id="main">
  <p class="middle" id="middle">Welcome to my Spectacular Show!</p>
  <p class="middle" id="middle1">
    Time for the show is <strong>6:59PM EST </strong> on
    <strong> May 28,2022</strong>
  </p>
</div>

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!