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

Tansform a dynamically created checkbox #30

Closed
crawc opened this issue Mar 1, 2013 · 4 comments
Closed

Tansform a dynamically created checkbox #30

crawc opened this issue Mar 1, 2013 · 4 comments

Comments

@crawc
Copy link

crawc commented Mar 1, 2013

Can't transform a dynamically created checkbox to the bootstrapSwitch. Is this possible?


$('#test').html('Switch: <div class="switch"><input type="checkbox" checked="checked" id="mySwitch"></div>');
then run
$('#mySwitch').bootstrapSwitch();

@nostalgiaz
Copy link
Collaborator

$('#test').html('Switch: <div id="mySwitch" class="switch"><input type="checkbox" checked="checked"></div>');

and then run

$('#mySwitch').bootstrapSwitch();

@crawc
Copy link
Author

crawc commented Mar 6, 2013

After I create the dynamically created switch and change toggle the switch it doesn't seem to change the value of the checkbox?

@crawc
Copy link
Author

crawc commented Mar 11, 2013

Or am I doing something wrong?

http://jsfiddle.net/7GbBX/10/

@nostalgiaz
Copy link
Collaborator

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

2 participants