Edit in JSFiddle

var $link = $("#to_comments");
$("body").html("<p>" + ".attr() : " + $link.attr('href') + "</p>" + "<p>" + ".prop() : " + $link.prop('href') + "</p>");
<a href="#comments" id="to_comments"></a>