- Tue Aug 13, 2019 7:38 am
#825946
Hi,
I would like to sum the keys of a checkgroup using javascript. As an example, lets say I have:
var Score = []
I would like to get the key of all the values in the $("#checkgroup") that are checked. i.e. If I have a checkgroup with three options, and if the keys for those options are 1,2,3 respectively, and all 3 are checked, I would like to have var Score = 6.
Any help would be great.
I would like to sum the keys of a checkgroup using javascript. As an example, lets say I have:
var Score = []
I would like to get the key of all the values in the $("#checkgroup") that are checked. i.e. If I have a checkgroup with three options, and if the keys for those options are 1,2,3 respectively, and all 3 are checked, I would like to have var Score = 6.
Any help would be great.