Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

335
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!