Just do:
$(":checked")...
for checked flags. In addition, you have the outer space in your expression before the ".type-element". If you want to make sure that checked flags have this class, use:
$(":checked.type-element")...
not ":checked .type-element" (note the space).
So the end result:
$(":checked.type-element").each( function(index) { alert('checked' + index); } );
source share