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

State does not change when associated input change value #521

Open
murbanowicz opened this issue Nov 19, 2015 · 0 comments
Open

State does not change when associated input change value #521

murbanowicz opened this issue Nov 19, 2015 · 0 comments

Comments

@murbanowicz
Copy link

Hi,

I am changing value of input, which is handled by switch by ajax request.
Nothing happens with switch despite of value in input.

this.checked = true;
$('input[id="editIsSpecial"]').bootstrapSwitch('state', true, true)

or false,false.
I tried with one true/false, without second argument - no result.

When it is:
$('input[id="editIsSpecial"]').bootstrapSwitch('state', true)
it runs onswitch change, but shows and later on hide.

$("[id='editIsSpecial']").bootstrapSwitch({onText: "Tak", offText: "Nie", size: "mini", onSwitchChange:(function (event, state) {
if (state == true) {
$('#editPeriodRow').slideDown("slow");
} else {
$('#editPeriodRow').slideUp("slow");
}
})
});

Can you help?

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

1 participant