Using Javascript to go to a sub url and then a specific section id within that url -


i having trouble making work.

i want use javascript change sub url , go specific section id well.

this i'm using:

javascript:

'click .acq-click'(event) {     location.href = '/products#acquisition'; } 

html:

<section id="acquisition"> html </section> 

however, when click button, takes me sub url hash, won't move section id. loads @ top of page.

what can make work?

what need anchor , link it:

place somewhere want go to:

<a name="anchor"></a> 

then can link position this:

<a href="#anchor">go anchor</a> 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -