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

259
Vistas
jQuery: Show div on click brings up not definied error

Got a Gravity Form within WordPress that has some paragraph fields that are hidden on page load and I have a text link that when clicked should show these fields.

Every time I try to run the script though, console comes back and says $ is not defined. Actually if I use $ or jQuery, the same error appears. No win.

Puzzled how to use this code then. Really simple and should work from all the examples I see.

$(document).ready(function(){
  $("#form-click").click(function(){
    $("#field_1_16").show();
    $("#field_1_17").show();
    $("#field_1_18").show();
  });
});
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

$ / jquery is not defined means jquery hasn't loaded yet. Be sure to include your script after the jquery include scripts.

You could try replacing your current code with javascript in the same scripts tag;

document.getElementById("form-click").addEventListener("click", function(){
   document.getElementById("field_1_16").style.display = 'block';
});
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