I have the following anchor tag
Google
I know how to get the href from an anchor take:>
On using the .text() as mentioned, I got the text of all the anchor tags combined in my code:
HTML:
First item Second item Third item
JS:
$("#listGroupUserRaces").click(function () { alert($(this).text()); });
OUTPUT: