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

326
Vistas
materializecss 1.0.0 reinitialize after dom change with jquery - ERROR: TypeError: Right-hand side of 'instanceof' is not callable

Good day,

I have a project that uses materializecss with jQuery. I have a DOM that is already filled with materialize elements, everything works wonderfully there.

However, as soon as I generate a "popup" that contains new DOM elements (such as a datepicker) they do not work. According to the documentation I could read that an M.AutoInit() is running at the beginning and therefore the elements are not yet initialized.

How do I ensure that all elements - whether popup or not - always work?

If I try to initialize a date selector again, I get the following error:

materialize.min.js:6 Uncaught TypeError: Right-hand side of 'instanceof' is not callable

This is how it worked for the elements not included in the popup:

$('.datepicker').datepicker(<options>);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I found the problem. Inside my script where I create those popups, there is a variable named "Element". Its a class attribute. I wanted to override it but without a this, cuz javascript ist flexible with this. The problem was now exactly, that materializecss has a variable named "Element", too. So I changed this one and triggered a error with $(".datepicker").datepicker();.

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