I have got ajax result with new element on page.
Checkbox is:
<input type="checkbox" checked="checked" uid="933518636168122368" class="flag">
How I can select him?
my code is not working, selector object is empty:
$(document).ready(function(){
if ($('.flag').is(':checked')) {
alert('checkit');
}
$('.flag').click(function(){
alert('checkit');
});
});
What I must to do?