hello,
i have this character count javascript which worsk fine. when user type in textbox it counts char and show in it span. minimium char of my textbox is 30 and maximum is 100
i want when user exceed 30 char so it should show right symbol in span and when user reached 100 limit it should show cross symbol
<script type='text/javascript'>
$('#spnCharLeft').css('display', 'none');
var maxLimit = 100;
$(document).ready(function () {
$('#<%= TextBox1.ClientID %>').keyup(function () {
var lengthCount = this.value.length;
if (lengthCount > maxLimit) {
this.value = this.value.substring(0, maxLimit);
var charactersLeft = maxLimit - lengthCount + 1;
}
else {
var charactersLeft = maxLimit - lengthCount;
}
$('#spnCharLeft').css('display', 'block');
$('#spnCharLeft').text(charactersLeft + ' Characters left');
});
});
</script>