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

177
Vistas
removing first 14 characters from string, works on fiddle but not site

I have this fiddle I have been testing to remove the first 14 characters from a span on my website, I'm trying to remove "Published on:"

https://jsfiddle.net/tetzuro/3ym8jwcu/

For some reason it won't work on the page, which is https://www.homecarepulse.com/blog/

I'm not sure what I am missing from my code but here it is for reference

$('.fusion-tb-published-date').text(function(_, txt) {
  return txt.slice(14);
});
<div class="fusion-meta-tb fusion-meta-tb-1 floated" style="padding-bottom:15px;min-height:36px;font-size:16px;">
  <span class="fusion-tb-published-date">Published On: Jul 28, 2022</span><span class="fusion-meta-tb-sep"></span>
  <span class="fusion-tb-author">By
<span><a href="" rel="author">author</a></span></span>
  <span class="fusion-meta-tb-sep"></span>
  <span class="fusion-tb-published-read-time">23.8 min read</span>
  <span class="fusion-meta-tb-sep"></span>
</div>

about 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

You are getting an error in the console

Uncaught TypeError: $ is not a function.

That means you are, most probably using it before the $ is initialised or not initialising it at all.

The fastest solution for this is to replace $ with jQuery:

jQuery('.fusion-tb-published-date').text(function (_,txt) {
    return txt.slice(14);
});
about 4 years ago · Santiago Trujillo Denunciar

0

Looks like you haven't imported the jQuery library on the site! In the dev console, I can see that $ isn't defined. Try importing the jQuery library from a CDN like so:

<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>

about 4 years ago · Santiago Trujillo Denunciar
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