I'm running into a issue where the checkbox of input elements are not correctly returning checked or not checked status. 2 input checkbox elements are dynamically called via ajax with default checked and updated in div element using innerHTML, when I uncheck the same checkbox element on a form and submit, it is still showing me 2 checked input elements when there are none checked, it is not showing correctly the current selection of the checkbox after unchecked.
Here is my jquery code
let checkboxes = document.querySelectorAll('input[name="checkboxele"]:checked');
From my code values array should have nothing because I have unchecked 2 checkbox elements, but when I print the values array I see there are 2 checkbox elements, probably from the default selection.