Skip to content

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

@switchlibrary

Description

@switchlibrary

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions