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

204
Views
Js no carga los clics en el enlace de la publicación dentro de la página

El siguiente es mi código para actualizar el precio de un artículo en la página, pero la página tiene algunas etiquetas de anclaje que conducen a una URL diferente (categorías de artículos para filtrar) sin actualizar la página y dado que no hay actualización de la página, el script no se está cargando . Intenté turbolinks: cargar también sin suerte.

 var $ = jQuery.noConflict(); $(document).on('ready', function() { setTimeout(checkPaqe, 3000); }); function checkPaqe() { var pageType = 'NA'; pageType = (dataLayer.find(dataLayer => dataLayer.PageType)["PageType"] != null) ? dataLayer.find(dataLayer => dataLayer.PageType)["PageType"]: "NA" if (pageType === 'ListingPage' || pageType === 'ProductPage' || pageType === 'HomePage') { updatePrice(); } } function updatePrice() { let pricetags = document.getElementsByClassName("price"); for (let i = 0; i < pricetags.length; ++i) { var price = pricetags[i].innerHTML; price = price.replace('$', ''); price = parseFloat(price) - 30; price = parseFloat(price).toFixed(2); pricetags[i].innerHTML = "<s style=\"color:red\">" + pricetags[i].innerHTML + "</s><br><span style=\"font-size: 10px;\">Your price with loyalty voucher <span style=\"font-size: 2.0em;\">$" + price + "</span></span>"; } } window.onhashchange = function() { console.log('hashchange'); } window.onpopstate = function() { console.log('popchange'); }
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!