使一级顶级导航不可点击 [英] Make first level top navigation unclickable

查看:81
本文介绍了使一级顶级导航不可点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我希望网站的第一级顶级导航不可点击.以下是我对示例的解释

Hi, I wanted the first level top navigation of my site to not be clickable. Below is my explanation with example

MenuHR

submenuhr1

submenuhr1

submenuhr2

submenuhr2

MenuFinance

submenuf1

submenuf1

submenuf2

submenuf2

我希望所有第一个级别(MenuHR,MenuFinance)都不可单击.我已经查看了链接 如何使顶部链接不可点击,说明它适用于SharePoint2010.但是,由于ID #s4-topheader2 在SharePoint 2013上不再可用,不能直接使用.我试图更换 #s4-topheader2 以及其他类和ID,但对我不起作用.我在整个网站集中都使用Oslo和Seattle Masterpages.你能帮我这个忙吗?

I wanted all the first levels(MenuHR, MenuFinance) to not be clickable. I have looked into the link how to make top links unclickable, which states it works for SharePoint 2010. But since the ID #s4-topheader2 is no longer available on SharePoint 2013, it does not work directly. I have tried to replace #s4-topheader2 with other classes and IDs but did not work for me. I'm using Oslo and Seattle Masterpages throughout the sitecollection. Could you please help me on this?

预先感谢

推荐答案



是否要使顶部导航不可点击?
如果是,则可以在网站设置->导航中删除导航URL.
 
之后,您可以单击下拉内容.
结果:
 
如果要粘贴URL,可以使用以下代码:

Hi,

Do you want to make the top navigation unclickable?
If yes, you can delete the navigation URL in site setting->Navigation.
 
After that, you can click the drop down content.
The result:
 
If you want to stick the URL, you can use the following code:

<script type="text/javascript" src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script type="text/javascript">


(.static.dynamic-children.menu-item.ms-core-listMenu-item.ms-displayInline. ms-navedit-linkNode"). attr("href","javascript:void(0);"); </script>
(".static.dynamic-children.menu-item.ms-core-listMenu-item.ms-displayInline.ms-navedit-linkNode"). attr("href","javascript:void(0);"); </script>



最好的问候,
卡尔·周



Best Regards,
Carl Zhou


这篇关于使一级顶级导航不可点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆