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

138
Views
JQuery: how to replace last child of <a> tag in tabs with another value?

I have JQuery tabs in the frontend, if I inspect one tab I have this:

<a id="dynautoRollAnchor1" href="#item1" style="font-size:13px" class="ui-tabs-anchor" role="presentation" tabindex="-1">
    <img src="someImage.png" class="tab-icon">
    1995
</a>

I'd like to replace the 1995 with another value (and keep the image). But if I execute this in the console:

$('#dynautoRollAnchor1:last-child').empty()

I will have this:

<a id="dynautoRollAnchor1" href="#item1" style="font-size:13px" class="ui-tabs-anchor" role="presentation" tabindex="-1">
</a>

So the image is gone...

Or how to replace the 1995 with let's say 2022 ?

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!