I have list of checkboxes that has all checkbox pre-checked when page load.
Firstly, I want to read all checkboxes (checked) value and store in global array.
Later, whenever any checkbox is clicked by user (un-checked / checked), I want to update the array with values of only checked checkboxes.
All this i want to do in jQuery.
thanks
Did you mean something like this?
(Maybe you should change the $(“body”) to a more precise container)
If you want an array with objects with name (…or id or maybe the element)… you can do something like this: