Domanda

Nella mia navigazione in alto ci sono diversi collegamenti che sono fondamentalmente citate.Sotto i sottogruppi sono ulteriori siti o pagine.Sto usando SharePoint 2013 predefinito navigazione predefinita nella mia pagina master personalizzata.Ho preso il suo codice da "Design Manager".

C'è un particolare ribaltamento di alto livello che voglio rendere non accitabile.Per e.g.Attualmente questa è la navigazione superiore.

Home
Sottosteso1
. Sottosteso2
. Sottosteso3
. Sottosteso4
. Subset5

Voglio rendere il sottosteso1 non accoppiabile, quindi c'è un modo per mettere un # nel suo URL, quindi quando l'utente lo fa clic, non succede nulla.

È stato utile?

Soluzione

You could achieve that using jQuery. Get the first link of the dropdown menu and set the href of that link.

$(function() {
    $("#DeltaTopNavigation > div > ul > li > ul > li > ul > li > a:first").attr("href", "#");
});

If you want the link to be completely unclickable, then you could also remove its attribute.

$(function() {
    $("#DeltaTopNavigation > div > ul > li > ul > li > ul > li > a:first").removeAttr("href");
});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top