Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var countChecked = function() {
- var n = $( ".checkData:checked" ).length;
- if (n > 0) {
- if (n > 1) {
- $(".mailQtd").html(n + ' e-mails selecionados!');
- } else {
- $(".mailQtd").html('1 e-mail selecionado!');
- }
- } else {
- $(".mailQtd").html('Nenhum e-mail selecionado!');
- }
- };
- countChecked();
- $('tr').click(function(event) {
- if (noAction == false) {
- if (event.target.type !== 'checkbox') {
- $(':checkbox', this).trigger('click');
- if ($(":checkbox", this).is(':checked')) {
- $(this).addClass('active');
- } else {
- $(this).removeClass('active');
- }
- }
- }
- });
- $(".checkData").on( "click", countChecked );
- $("#checkAll").click(function(){
- $('input:checkbox').not(this).prop('checked', this.checked);
- countChecked();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement