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