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

the toggle div container should copy some attributes from input tag (ie title) #138

Open
quazardous opened this issue Nov 7, 2016 · 3 comments

Comments

@quazardous
Copy link

quazardous commented Nov 7, 2016

I needed to add a title attr to the toggle but setting it to the input tag did not work.

I had to copy the attr with some code:

$('#my-switch').parent().prop('title', $('#my-switch').prop('title'));

maybe this could be done by default for a selected list of attributes

@quazardous
Copy link
Author

quazardous commented Nov 9, 2016

more generic code (with bootstrap and onoffswitch-checkbox class to trigger the plugin):

$(function() {
    var toggle = $('.toggle input.onoffswitch-checkbox');
    toggle.parent().prop('title', toggle.prop('title'));
});

@Xigamod
Copy link

Xigamod commented Jun 26, 2018

This would be a great feature to add to copy certain attributes, such as those for ADA Compliance, etc.

@katapofatico
Copy link

Checkbox Title as Title of the toggle #46 appears to be merged on master (10 Jun 2015), but don't work for me.

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

3 participants