I have a checkbox in a lightning component:
<ui:inputCheckbox aura:id="chkAddToList" click="{!c.action}" class="chkMultiSelectTalents" />
In a different component's controller (or helper), I'm trying to uncheck the checkboxes. The jQuery selector works:
$('.chkMultiSelectTalents');
But the pure javascript option does not. getElementsByClassName AND querySelectorAll both return null:
var selectedCheckedBoxes = document.getElementsByClassName('chkMultiSelectTalents');
var selectedCheckedBoxes = document.querySelectorAll('.chkMultiSelectTalents');
When running the classic javascript in Chrome's developer console, it find the elements. Makes debugging this that much harder.
I'm pretty new to Lightning so I may be overlooking something obvious. I have these same selectors other components, and it's working fine. Thanks!