Vue-router: jump to anchor tag

Created on 25 Jul 2016  路  1Comment  路  Source: vuejs/vue-router

I have looked at the docs, but cannot find how to work jumping to a named anchor, classic HTML style. I do not wish to change my route view - just jump from one part of the body text to the other via an anchor tag.

<a href="#about">About</a>
Further down the body will be ..
<span name="about">business as usual</span>

This is simple stuff, but obviously if this is not being mapped by my router it will cancel it from being appended and jumping to the relevant section.

Most helpful comment

This doesn't have anything to do with vue-router. The name attribute only works when jumping to a named _anchor_. If you wish to jump to a span, you'll have to use id, which is preferred anyway in HTML5. See this.

>All comments

This doesn't have anything to do with vue-router. The name attribute only works when jumping to a named _anchor_. If you wish to jump to a span, you'll have to use id, which is preferred anyway in HTML5. See this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kerlor picture kerlor  路  3Comments

alexstanbury picture alexstanbury  路  3Comments

marcvdm picture marcvdm  路  3Comments

shinygang picture shinygang  路  3Comments

thomas-alrek picture thomas-alrek  路  3Comments