Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

202
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda