Skip to content

Animation not set up with bootstrap.js #381

@frapontillo

Description

@frapontillo

If I set up an animated switch (which is the default), the switch won't add the bootstrap-switch-animate until the middle handler is clicked; this means that clicking on the labels will toggle the switch but won't animate it until at least one click is triggered on the handler.

$('#theSwitch').bootstrapSwitch({
  state: false,
  animate: true
});

A live demo is available at http://plnkr.co/edit/xGaH6qHhgOUw9qyQ7yrC?p=preview.

Also, could you please specify if this plugin needs bootstrap.js? Because if I remove bootstrap.js from the referenced scripts, the bootstrap-switch-animate is indeed added! The counter-effect is that the switch (being in a false state since the initialization) will animate from true to false upon initialization. You can try all of this in the demo I already linked.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions