Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

148
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda