[aur-dev] [PATCH v2 2/2] Show number of selected packages on search page

carstene1ns arch at carsten-teibes.de
Thu Jul 2 21:30:00 UTC 2015


Am 02.07.2015 um 16:55 schrieb Johannes Löthberg:
> Fixes FS#45379.
> 
> Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
> ---
> Changes since v1:
> * Use jQuery
> * Allow for better localization
> * Without JS there won't be any counter listed

+1

> +	var elements = $('.package-checkbox');
> +	for (var i = 0, len = elements.length; i < len; i++) {
> +		elements[i].onchange = update_checked_count;
> +	}

I think a loop is not needed here, this should do the same:

$('.package-checkbox').change(update_checked_count);

best regards,
carstene1ns

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20150702/060c59ef/attachment.asc>


More information about the aur-dev mailing list