$('a').size(); w3schools jquery code example Example: string length jquery var string = "string" string.length