Topic: MDB Select appears multiple times when calling material_select()

matthias_deox pro asked 7 years ago


Hello, I'm using ajax on my page so when I insert new HTML code with a selectbox in it, I call $(".mdb-select").material_select(); to transform it into the material select box. Now when there's already a material select on the page, this gets doubled like it's shown in this picture. Example Is there a way to prevent this except from giving each material_select an individual ID and then calling it from the id $("#id").material_select(); ? Thank you

agrislab priority answered 4 years ago


I got the same issue.. In my case the code $('.mdb-select').materialSelect(); was initialised multiple times. By removing unwanted instance of $('.mdb-select').materialSelect(); worked for me


hardikpanchal free answered 5 years ago


Hello, I'm facing the same issue. Could you please advise if this is fixed? We are using the latest MDB pro for jquery


Michal Szymanski staff answered 7 years ago


I didn't meet this issue before so I cannot advice you anything better than calling select by id. I'll investigate it in the near future.

Ilya Pogudin pro commented 6 years ago

I'm having the same problem. The forms are dynamic, all the time on id is not very convenient. Solutions found?


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags