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

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

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 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