Can someone explain and give me a solution why the bootstrap toggle button works fine when page loads but does not when using template and javascript
This code works