FAQ Database Discussion Community


Disable textarea on checkbox :checked with bootstrap-switch

jquery,bootstrap-switch
I have an MVC app where I have a class of bools. There is a textarea next to each switch to enter comments if the item is indicated as rejected (returns false). I need to have the textarea disabled if the the swith is set to Accepted (returns true). I...

Bootstrap Toggle for Checkbox adding extra div

jquery,checkbox,toggle,clone,bootstrap-switch
We have a form where users can create a shipping type by entering a name in a text field and optionally toggle a checkbox. To add another shipping type, we use jQuery's clone method to rebuild the fields one or more times. My goal is to change the checkbox into...

How to initialize bootstrapSwitch()?

asp.net-mvc,twitter-bootstrap,bootstrap-switch
I am missing something simple, but can'T find it. In my asp.net MVC5 project, I want to use bootstrap-switch. This is what I've done: BundleConfig.cs: added bootstrap-switch.css and bootstrap.switch.js as follows, bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( "~/Scripts/bootstrap.js", "~/Scripts/respond.js", "~/Scripts/bootstrap-switch.js")); bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.css", "~/Content/bootstrap-switch.css", "~/Content/site.css")); (and made sure the files are at those locations)....