I am poor knowledge in jquery. I have mentioned the script below
var header = $('.time'+col).text();
alert(header);
I got string as "109:00AM" from that how to get first letter such as 1. Could you please help me.
I am poor knowledge in jquery. I have mentioned the script below
var header = $('.time'+col).text();
alert(header);
I got string as "109:00AM" from that how to get first letter such as 1. Could you please help me.
Try with charAt(0)
like
var header = $('.time'+col).text();
alert(header.charAt(0));
You can also use substring
like
alert(header.substring(1));
And as @Jai said you can use slice
also like
alert(header.slice(0,1));