Hey all i am trying to figure out why, when i populate my page with data, when i try to do a .click event on a checkbox that it never finds it... but when i have the code on the page without being gathered from ajax it works just fine?
jQuery(document).ready(function () {
jQuery('#selectAll').click(function () {
console.log('hit');
});
});
<th scope="col" id="cb" class="manage-column column-cb check-column">
<input id="selectAll" type="checkbox">
</th>
The above code works just fine if the checkbox code is on the page to start with but does not work if the same code is populated via ajax.
What would i be doing incorrectly?