I tested the following statements and it really works.
$(function() { $("a").attr("href", "#123"); });
And if I click on any link, then the place actually attached # 123 at the end is without a doubt.
I think your problem may be, your ".1" is not attached to the binding object. In the HTML specification, only the hyperlink (and some inappropriate html tags) have the "href" attribute. This means, for example, that your .1 is actually <div class='.1'> , then even you put the href attribute on it, it would not have the default behavior acting as a "hyperlink". In this case, you should programmatically navigate to the specified URL, for example:
$(".1").click(function(){ window.location = "current/url" + "#home"; });
xandy source share