Address-book jQuery support
I have a address book with groups and contacts, and I'd like to have some sort of jQuery functionality that allows each contact or group to be individually selected, i.e. with a checkbox
Is there a easy way to get the following functionality? (in a jQuery plugin or just plain javascript)
- Select a whole group of contacts
- Select all groups,开发者_开发百科 which in order selects all contacts
SMSCity.com has this functionality that I want (see screenshot below)
just add a css class to each row containing the group name: e.g. group group-friends
and then select them by calling
$(".group-" + groupname + " input:checkbox").prop("checked", true);
and to select all contacts, just call:
$(".addressbook tr input:checkbox").prop("checked", true);
or only those which are in a group:
$(".group input:checkbox").prop("checked", true);
精彩评论