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

Select All/Deselect All option for check-form #12

Open
switchlibrary opened this issue Mar 4, 2024 · 0 comments
Open

Select All/Deselect All option for check-form #12

switchlibrary opened this issue Mar 4, 2024 · 0 comments

Comments

@switchlibrary
Copy link

Thanks so much for making your code available. In the past, we had adapted it to allow a select all/deselect all option with this in the popuphtml

Select / Deselect All

And this in the options.js

$('#selectAll').click(function() {
if(this.checked) {
$(':checkbox').each(function() {
this.checked = true;
});
} else {
$(':checkbox').each(function() {
this.checked = false;
});
}
});

$(document).ready(function () {
//SEARCHBOX STUFF
$('#selectAll').click(function() {
if(this.checked) {
$(':checkbox').each(function() {
this.checked = true;
});
} else {
$(':checkbox').each(function() {
this.checked = false;
});
}
});

before listing all the selection ids.

Now that you are using Bootstrap's form-check, I am not sure how to add in a functioning select all/deselect all. Any help you can provide would be really appreciated.

Katie Utschig
SWITCH Library Consortium

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