Shakil Ahmed

Shakil Ahmed

  • NA
  • 49
  • 4.1k

get span error status

Jan 7 2018 1:00 AM
 i used this code for show text box error in span.
now i want return status - true or false  based on showing message
 
if ($('#Code-Id').val().trim() < 2) {
$('#Code-Id').siblings('span.error').css('visibility', 'visible');
}
else {
$('#Code-Id').siblings('span.error').css('visibility', 'hidden');
}

Answers (2)