Comments (2)
@BobWarren Hi,
I just found that lib but I think I can help,
I have seen the demo's and they use the checked attribute instead of disabled (make's sense)
$('#toggle-trigger').prop('checked', true).change()
switch your disabled to checked (on input tags ofcourse).
let me know if it did worked for you
from bootstrap-toggle.
Hi Everyone,
I am facing the same problem, i am using toggle in a form,
i can't have the value in form POST because it is not considered checked, even i checked it manually.
so i tried to use $('#toggle-trigger').prop('checked', true).change();
in page ready function with no effect
$(document).ready(function() {
$('#IPV6t').prop('checked', true).change();
});
how i solved this problem:
by creating another hidden checkbox and use java script to replicate the status:
$('#IPV6t').change(function() {
$('#IPV6t').val($(this).is(':checked'));
$('#IPV6').prop('checked', $('#IPV6t').is(':checked'));
$('#IPV6').val($('#IPV6t').is(':checked'));
});
jquery-3.5.1.min.js:2 Uncaught RangeError: Maximum call stack size exceeded
at String.replace ()
at X (jquery-3.5.1.min.js:2)
at G.get (jquery-3.5.1.min.js:2)
at Object.trigger (jquery-3.5.1.min.js:2)
at HTMLInputElement. (jquery-3.5.1.min.js:2)
at Function.each (jquery-3.5.1.min.js:2)
at S.fn.init.each (jquery-3.5.1.min.js:2)
at S.fn.init.trigger (jquery-3.5.1.min.js:2)
at S.fn.init.S.fn. [as change] (jquery-3.5.1.min.js:2)
at HTMLInputElement. ((index):287)
from bootstrap-toggle.
Related Issues (20)
- Button only toggles once; button display doesn't have border HOT 3
- Styling Disabled Toggle HOT 3
- Float Element Classes
- bootstrap outline class not working on data-off HOT 1
- readonly attribute is ignored HOT 3
- Events not reaching Stimulus.js
- Bootstrap 4.3.1 HOT 3
- Click event? HOT 1
- How do I grab the checked value on init? HOT 2
- Issue with out-of-the-box css
- Value is always true
- Change data-on/off text/label with .bootstrapToggle('disable') / ('enable')
- toggleDevice doesn't scale with length of text HOT 3
- bootstrap-toggle not working in angular 11 HOT 1
- Support Bootstrap 5
- onchange function Runs twice. HOT 2
- how to change style of text to bold? HOT 1
- Confirmation Dialogue HOT 4
- How to align images?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bootstrap-toggle.