Get value from tag in jQuery
The <a> tag creates a binding that does not matter (usually only tags that create input). If you need the value of one of its attributes, you can use the .attr() function.
For instance:
alert($(this).attr('at')); // alerts "privat" If you need the value of its text (the content between the <a> and </a> tags), you can use the .text() function:
alert($(this).text()); // alerts "Privat" If your HTML was slightly different and the <a> tag contained other HTML, not just text, for example:
<a href="?at=privat" at="privat" class="Privat"><span>Privat</span></a> Then you can use the .html() function to do this (it will return <span>Privat</span> ). .text() will still return "Private", even if it is wrapped in a gap.