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

195
Vistas
Basic JavaScript/JQuery Function Not Working for No Reason

My teammate and I have been tirelessly working at this seemingly impossible bug with js/jquery. We have a simple function called feedback in our .js file, but it is not working. See our replit link below:

https://replit.com/join/pryxsdvjtz-5pengoo

Please help.

Edit: Here's the function:

function feedback(event) {
  event.preventDefault();
  console.log("this function ran");
  var text = $('#text');
  console.log(text);
}

I've reduced a lot of its functionality for debugging purposes but all I want it to do is print "this function ran" in the console. Thank you!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

This is because I think, replit is not redirecting to create.html which you can verify from the url in the mini browser window. I feel this is how the replIt works. Whereas, if you tried in new tab you can see create.html in the url as a path. If the create.html is not loaded, then your script is also not loaded right. So, your function is not executed.

In the top right corner of the browser preview window in replit there is one option for opening the url in new tab. The code you posted works there. It is not working in the preview-browser-window. So there is nothing wrong with your code.

about 4 years ago · Juan Pablo Isaza 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