Links com um atributo href
vazio são válidos, conforme explicado em RFC2396 :
4.2. Same-document References
A URI reference that does not contain a URI is a reference to the current document. In other words, an empty URI reference within a document is interpreted as a reference to the start of that document, and a reference containing only a fragment identifier is a reference to the identified fragment of that document. Traversal of such a reference should not result in an additional retrieval action. However, if the URI reference occurs in a context that is always intended to result in a new request, as in the case of HTML's FORM element, then an empty URI reference represents the base URI of the current document and should be replaced by that URI when transformed into a request.
Não é realmente uma questão significativa o suficiente para ser algo mais do que uma preferência pessoal. Pessoalmente, eu iria com uma terceira opção:
<a id="myLink" href="<url>" />
... onde <url>
é a url do meu pedido de ajax. Obviamente, isso introduz uma etapa no jQuery:
$("#myLink").click(function(event) {
event.preventDefault();
url = $(this).attr("href");
// do ajaxy stuff
});
... mas eu acho que é um pouco mais conveniente do que codificar o url em Javascript, faz sentido semanticamente (checando seu código alguns anos depois que você o escreveu, o URL será onde você irá procurar primeiro - provavelmente). Também é um truque legal se você tiver alguns links ajax-y simplistas que fazem mais ou menos a mesma coisa. Considere este exemplo:
<a class="ajax" href="<url1>">
<a class="ajax" href="<url2>">
<a class="ajax" href="<url3>">
$("a.ajax").click(function(event) {
event.preventDefault();
var url = $(this).attr("href");
$.get(url, function(data) {
console.log(data);
});
});