check length in jquery code example
Example 1: jquery get the length of input text
$('input selector here').val().length
Example 2: jquery count elements
var count_elements = $('.class').length;
Example 3: string length jquery
var string = "string"
string.length