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

189
Views
How to extract the <title> value

JS is not my main skill, hope someone can help. I am trying to make a GTM variable to extract . Problem is that I cant use class="rg-trailer-icon" as a class name because it changes based on the truck type that is viewed (trailer, truck, etc)

enter image description here

Thank you!

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

0

You can extract the title. You just have to scramble through.

t = document.querySelector('#scheduleContainer svg title').innerHTML
console.log(t)
<div id="scheduleContainer">
  <div>
    <div>
      <svg>
        <title>Hello</title>
        <path>
          </svg>
      </div>
    </div>
</div>

about 4 years ago · Juan Pablo Isaza Report

0

in javascript, using document.title should be enough

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!