Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setState unable #502

Open
zweite opened this issue Aug 20, 2015 · 5 comments
Open

setState unable #502

zweite opened this issue Aug 20, 2015 · 5 comments

Comments

@zweite
Copy link

zweite commented Aug 20, 2015

use:
$('#disable-switch').bootstrapSwitch('setState', false); // true || false
error:

Uncaught TypeError: Cannot read property 'apply' of undefined

but use:
$('#disable-switch').bootstrapSwitch('state', false);
it is right.

@Sleepydragn1
Copy link

+1 on this, 'setState' causes the error described, but using 'state' to change the state (which isn't in the documentation from what I can see) works fine.

@Seether85
Copy link

I'm totally confirming this issue as well.
And same applies to 'setDisabled'.

@gogglespisano
Copy link

Which version are you using? AFAIK, setState and setDisabled are for V2 and don't exist in the current V3 version.

@Seether85
Copy link

Right, I'm using v3.3.2.
Looking for docs, I didn't notice that under Documentation menu, the last page is for V2 only, while the first three seem to be for V3.
Fair mix of oversight on my part and a bit of confusion on the menu I guess :)

@TheZoker
Copy link

TheZoker commented Apr 1, 2016

+1
Is there any function like that for v3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants