Topic: Error displaying a bootstrap component with JQuery innerHTML or html to add content dynamically
Antons free asked 1 month ago
Why when adding a mdbootstrap component via JQuery's innerHTML or html, does the functionality of the components not work despite the redundancy?
In the previous example, a component of the treeview plugin is loaded through innerHTML and the functionality when clicking on the drop-down elements does not work, I attach an example of the code used, additionally I have already tried other components of mdbootstrap for example: select, input, among others
kpienkowska staff answered 1 month ago
Components with HTML auto init are initiated on the initial page load.
If you add components dynamically you need to init them with js or jQuery after they are added.
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: MDB Standard
- MDB Version: MDB5 6.1.0
- Device: PC HP
- Browser: Google Chrome, Firefox
- OS: Windows 10
- Provided sample code: No
- Provided link: No