[英]Link in Nav won't work
I've tried to get the 'Stu' link to direct to index.html, but instead the click opens the nav drawer. 我试图获取“ Stu”链接以直接指向index.html,但是单击可以打开导航抽屉。
Try as I might, I can't fix it. 请尝试,但无法解决。 I have a feeling it's something to do with the Javascript.
我觉得这与Javascript有关。 Beyond my capabilities unfortunately.
不幸的是,超出了我的能力。
Any help would be greatly appreciated. 任何帮助将不胜感激。
http://stuseddon.co.uk/test/index.html http://stuseddon.co.uk/test/index.html
Add the following code to your pages: 将以下代码添加到您的页面:
$('a.navbar-brand').click(function(e) {
e.stopPropagation();
});
It stops the click event from propagating to the link's parent which opens the "nav drawer" when clicked. 它阻止click事件传播到链接的父级,该父级在单击时打开“导航抽屉”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.