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

389
Views
.Replace is not replacing the text

I have the following div:

document.querySelector('.ducp-component-cart-item.cart-item.YQ.sm').children[0].children[0].innerHTML

Which has a string value:

Airline Fuel Fee - non-refundable (YQ)

I am trying to remove the "- non-refundable" text with the following but it doesn't change it:

document.querySelector('.ducp-component-cart-item.cart-item.YQ.sm').children[0].children[0].innerHTML.replace('<div class="seats-together"><div class="cart-item-label">Airline Fuel Fee - non-refundable (YQ)</div></div>', '<div class="seats-together"><div class="cart-item-label">Airline Fuel Fee (YQ)</div></div>');

The console does show that the change has happened but when checking the element the change does not reflect.

Screen-shot

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!