自从我尝试(意味着在生产中启用它)asset.precompiling,我开始在本地看到时髦的功能。
具体来说,我在页面刚加载时就开始看到这个弹出窗口。
Navigation Broken: The menu link "Home" points to a nonexistent ID "#home".
To solve this, add the ID "home" to a tag, for example: <article id="home">
单击弹出窗口后,链接正常工作。
这是一个单页网站,所以当我点击一个菜单项时,它会正确地向下滚动。
这是 nav
的样子:
<nav class="menu two-thirds column omega">
<ul>
<li><a href="#home" class="active">Home</a><br /></li>
<li><a href="#features" class="active">What is it?</a><br /></li>
<li><a href="#pricing" class="active">How much?</a><br /></li>
<li><a href="/login" class="active">Login</a><br /></li>
</ul>
</nav>
实际的元素是这样的:
<article id="features" class="dark">
想法?
最佳答案
我发现的修复只是将 anchor 标记的路径从 #home
更改为 \#home
。
不确定是什么原因导致了这个问题,但这对我来说已经解决了。
关于javascript - 导航损坏 : The menu link "Home" points to a nonexistent ID "#home" - javascript prompt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10943365/