Skip to content

Silent API #7

Closed
Closed
@aswin1980

Description

@aswin1980

Hi,
I have gone through the code and in order to not trigger change event and set silent this is what we have done.

 var bs = $(company).bootstrapToggle().data('bs.toggle');
 bs.on(true);

is this correct?
Is there a better way to do it?
something like

$('#toggle-demo').bootstrapToggle('on,silent')

The use case is I ask the user a question in an alert to answer yes or no in JS change event when the toggle the checkbox. If the user answers no I should go back to the original state and not trigger the change.

Appreciate if this can be added to your API document

Thanks
Aswin

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions