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
Post a Comment