Topic: Checkbox state is not changed with bootstrap switch after an ajax request
abtsolutions pro asked 6 years ago
abtsolutions pro answered 6 years ago
Jakub Strebeyko staff commented 6 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, KubaJakub Strebeyko staff answered 6 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 6 years ago
Jakub Strebeyko staff answered 6 years ago
abtsolutions pro answered 6 years ago
Jakub Strebeyko staff answered 6 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
abtsolutions pro commented 6 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.