You are viewing limited content. For full access, please sign in.

Question

Question

The delete row "X" is no longer available on table.

asked on September 14, 2015

I have a table that no longer shows the little x at the end of a row, so i can delete that row.  Below is the javascript that I am using, which seems to be the culprit I just don't know where.

$(document).ready(function () {
  $('.MyTable').on('change','.stipDate input', function(){ 
    //$('.stipDate input').each(function() {
  var a = ($(this).closest('.stipDate input').val());
   var years = a.slice(0,4);//($('.stipDate input').val().slice(0,4)); 
  var x = new Date();
   var year = x.getFullYear();
    if ($(this).val() != '' && years == year){  
      $('.hours input').attr('readonly', true);  
      $(this).closest("tr").addClass("RedBackground");
      $('.hours input').removeClass("required").removeAttr('required');
      $('.hours span.cf-required').remove();      
  }else{
      $(this).closest("tr").removeClass("RedBackground");
      $('.stipDate input').attr('readonly', true);
      $('.hours input').closest().attr('readonly', false);
      $('.hours label').append('<span class="cf-required">*</span>');
            $('.hours input').closest().attr('required', True);
    }
});
});

 

0 0

Answer

SELECTED ANSWER
replied on September 14, 2015

$('.hours input').closest().attr('required', True); <-- it was the t in true, should have been lower case. smiley

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.