开发者

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)

Address-book jQuery support


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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜