Running code:

$(location).attr('href','http://site.ru/go#1000' ); 

Must: open this page and go to the anchor there

As it is: just goes to the anchor.

how to fix?

    2 answers 2

    After your team try

      location.reload(); 

    to refresh the page.

    UPD

    You can specify true to reload the page from the server http://www.w3schools.com/jsref/met_loc_reload.asp

    UPD2

    To go to the anchor without rebooting, use

     location.replace(ТУТ URL#АНКОР); 

    http://www.w3schools.com/jsref/met_loc_replace.asp

    • slyly, maybe you need to substitute some other parameter instead of href? there can be no such opportunity - Rufex
    • I don’t like the reload because it reloads the page and you can see clearly that it takes longer to load than if you make a simple transition - Rufex
    • @Rufex, you yourself said that you need a download in question? - Visman 5:46 pm
    • @Rufex, use location.replace() for a simple transition without downloading w3schools.com/jsref/met_loc_replace.asp - Visman 5:47 pm
    • true, but you just need to follow the link with the anchor, and not reload the page - Rufex

    Use native JS

     window.location = 'http://site.ru/go#1000'; 
    • on hash just throws - Rufex
    • @Rufex browsers have the right not to reload the page if the resource does not change, but only a hash is added. Why do you need to reload the page for a hash? Then use location.reload(); - korytoff
    • @korytoff, the author apparently needs something that does not exist in nature, judging by the comments on my answer. - Visman