Topic: Checkbox state is not changed with bootstrap switch after an ajax request
abtsolutions pro asked 7 years ago
Jakub Strebeyko staff answered 7 years ago
abtsolutions pro answered 7 years ago
Jakub Strebeyko staff answered 7 years ago
abtsolutions pro answered 7 years ago
Jakub Strebeyko staff answered 7 years ago
Hi there Aurel,
As I understand, to fix it you had to listen to the 'change'
event on body
and only then filter it out in terms of descendant selector (’.switch input[type=”checkbox”]’
). Hopefully, it will serve as a reference to anyone facing similar issue. Big thanks for taking time and clarifying it all!
With Best Regards,
Kuba
abtsolutions pro answered 7 years ago
Jakub Strebeyko staff commented 7 years ago
Hey Aurel, It is definitely something to consider when it comes to form submission. Many thanks for taking time and explaining the issue in such a detailed way! Best Regards, KubaFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
abtsolutions pro commented 7 years ago
I understand it is needed an initialization method for the .switch checkbox to init the field after ajax but there is nothing about it in docs.